invio email di aruba con swift mailer

420 views
Skip to first unread message

Danilo Eusepi

unread,
Jun 20, 2016, 11:04:06 AM6/20/16
to yii-it
Salve ragazzi, ho una casella di posta gestita da aruba e sto tentando di inviare delle email con swiftmailer, già usato con altri gestori di posta.
Quali parametri devo utilizzare per effettuare l'invio?

ciao grazie in anticipo

Lorenzo Milesi

unread,
Jun 20, 2016, 11:59:24 AM6/20/16
to yii...@googlegroups.com

> Salve ragazzi, ho una casella di posta gestita da aruba e sto tentando di
> inviare delle email con swiftmailer, già usato con altri gestori di posta.
> Quali parametri devo utilizzare per effettuare l'invio?

direi in ssl:
https://kb.aruba.it/kb/a653/come-utilizzare-il-protocollo-ssl-per-le-caselle-di-posta-dei-domini.aspx

--
Lorenzo Milesi - lorenzo...@yetopen.it

YetOpen S.r.l. - http://www.yetopen.it/

Danilo Eusepi

unread,
Jun 20, 2016, 12:06:14 PM6/20/16
to yii-it, max...@ufficyo.com
Ho eseguito il dump con il comando della classe e questo è l'errore:

Expected response code 250 but got code "501", with message "501 HELO requires valid address
"
Log data:
++ Starting Swift_SmtpTransport
<< 220 smtpcmd09.ad.aruba.it bizsmtp ESMTP server ready

>> EHLO [::1]

<< 501 EHLO requires valid address

!! Expected response code 250 but got code "501", with message "501 EHLO requires valid address
" (code: 501)
>> HELO [::1]

<< 501 HELO requires valid address

!! Expected response code 250 but got code "501", with message "501 HELO requires valid address
" (code: 501)


La classe è così configurata:



        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'transport' => [
           'class' => 'Swift_SmtpTransport',
           'plugins' => [
           [
           'class' => 'Swift_Plugins_LoggerPlugin',
           'constructArgs' => [new Swift_Plugins_Loggers_ArrayLogger], //thanks @germansokolov13
           // it could also be any Swift_Plugins_Logger implementation (e.g., the EchoLogger)
           ],
           ],
           'host' => 'smtps.aruba.it',
           'username' => 'acc...@dominio.it',
           'password' => 'password',
           'port' => '465',
           'encryption' => 'ssl',

            ],

        ],

Dov'è il problema?

Lorenzo Milesi

unread,
Jun 20, 2016, 12:12:55 PM6/20/16
to yii-it
> EHLO [::1]
> Dov'è il problema?

sembra che SwiftMailer sbagli ad ottenere l'hostname locale, presentandosi ad Aruba come [::1] (localhost)

Prova a guardare qui:
http://stackoverflow.com/questions/22562037/configure-swiftmailer-local-domain-setting-easily-in-symfony-2

Danilo Eusepi

unread,
Jun 21, 2016, 12:19:15 PM6/21/16
to yii-it, max...@ufficyo.com
Hai perfettamente ragione, con i parametri del mio server da locale non ho problemi nel presentarmi al server, mentre con l'account di aruba si.
Smanettando, a seguito della tua dritta ho impostato l'hostname locale e ho risolto il problema.
Reply all
Reply to author
Forward
0 new messages