Ich benutze Swiftmailer, um E-Mails von yii2 zu senden. Ich bekomme Code von Websites, aber die meisten von ihnen senden E-Mails von gmail.com. Ich möchte E-Mails von meiner Universitäts-E-Mail senden, aber es funktioniert nicht. Was ist das Problem. Dies ist der Code:E-Mail von anderen smtp in yii2 senden
Im Haupt local.php
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => /*true*/false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.students.del.ac.id',
'username' => '[email protected]',
'password' => 'bmelar28',
'port' => '587',
'encryption' => 'tls',
],
],
versuche 'smtp' im Host zu entfernen wie' 'host' => 'students.del.ac.id'' – vishuB