swiftmailer

swiftmailer send email using gmail with custom domain

ε祈祈猫儿з 提交于 2019-12-18 17:38:11
问题 In symfony2.3 I am using swiftmailer. I have a Google Apps address like myname@abc.com and my normal gmail address myname@gmail.com When using: mailer_transport: smtp mailer_encryption: ssl auth_mode: login mailer_host: smtp.gmail.com mailer_user: myname mailer_password: pymass the configuration works great and it sends emails from my gmail address but using myname@abc.com as mailer_user with correct password doesn't work. Any ideas? 回答1: The configuration for sending from (what I assume is)

Swift Mailer - Can't send mail, and can't find error logs

耗尽温柔 提交于 2019-12-18 04:09:26
问题 New to PHP and Swiftmailer and have yet to get it working. I've uploaded the /lib/ directory to a directory in the root of my shared webserver from Hostgator. I've uploaded the following inside in the directory above /lib/: <?php require_once 'lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('mail.****.com', 25) ->setUsername('****@****.com') ->setPassword('****'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('Subject Here') -

Swift Mailer - Can't send mail, and can't find error logs

旧巷老猫 提交于 2019-12-18 04:09:06
问题 New to PHP and Swiftmailer and have yet to get it working. I've uploaded the /lib/ directory to a directory in the root of my shared webserver from Hostgator. I've uploaded the following inside in the directory above /lib/: <?php require_once 'lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('mail.****.com', 25) ->setUsername('****@****.com') ->setPassword('****'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('Subject Here') -

PHP Swift mailer: Failed to authenticate on SMTP using 2 possible authenticators

喜夏-厌秋 提交于 2019-12-17 23:10:07
问题 When I send an email with the PHP Swift mailer to this server: smtp.exchange.example.com like this: // Load transport $this->transport = Swift_SmtpTransport::newInstance( self::$config->hostname, self::$config->port ) ->setUsername(self::$config->username) ->setPassword(self::$config->password) ; // Load mailer $this->mailer = Swift_Mailer::newInstance($this->transport); // Initialize message $this->message = Swift_Message::newInstance(); // From $this->message->setFrom(self::$config->from);

PHP Fatal error: 'Swift_TransportException' with message 'Failed to authenticate on SMTP server

笑着哭i 提交于 2019-12-17 18:44:33
问题 I know this question's been asked before and I've read all the posts out there, but I still can't find a solution to this. I have a windows machine with wamp installed on it. When I try to send a simple email via google's SMTP server everything works fine. Though, when I copy that same script to an Ubuntu 12 machine, it gives me that error: PHP Fatal error: Uncaught exception 'Swift_TransportException' with message 'Failed to authenticate on SMTP server with username "xxx@gmail.com" using 2

PHP - Swiftmailer using STARTTLS and self signed certificates

拟墨画扇 提交于 2019-12-17 18:23:58
问题 I'm trying to send an email with php and swiftmailer, using STARTTLS, but I'm getting a certificate error. I have root access to the SMTP server, and the certificate used is self-signed. I'm using Debian on both machines (web server and smtp server) PHP message: PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in [..]/lib/classes/Swift/Transport/StreamBuffer

PHP - Swiftmailer using STARTTLS and self signed certificates

*爱你&永不变心* 提交于 2019-12-17 18:21:04
问题 I'm trying to send an email with php and swiftmailer, using STARTTLS, but I'm getting a certificate error. I have root access to the SMTP server, and the certificate used is self-signed. I'm using Debian on both machines (web server and smtp server) PHP message: PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in [..]/lib/classes/Swift/Transport/StreamBuffer

How to use the swiftMailer in Yii2

 ̄綄美尐妖づ 提交于 2019-12-17 17:32:44
问题 I can't finally understand how to use the swiftMailer extension in Yii2. Judging by that on this subject I didn't find questions, the task is trivial, but up to the end I couldn't understand. There are examples which don't describe in more detail all cycle of sending the letter or I don't understand something :( Setup return [ //.... 'components' => [ ...... 'mail' => [ 'class' => 'yii\swiftmailer\Mailer', 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'localhost', 'username' =>

mailer symfony 4 not working

梦想与她 提交于 2019-12-17 17:16:58
问题 I started a project using symfony 4 and the mailer doesn't work, however it should be easy. before you ask, if i copy past the login and password from my code i'm able to log into my mail account, also i also tried with a netcourrier mail account, also the 2 way authentification is not active and i allowed less secure app to access the mail account. Here's my conf: in my .env: MAILER_URL=gmail://*******@gmail.com:********@localhost in my controller: public function contact( \Swift_Mailer

PHP, Swift-mailer problem

我只是一个虾纸丫 提交于 2019-12-17 17:03:42
问题 When I click submit button on my contact page, trying to submit a form that uses swift-mailer, I get this: Warning: fopen(uploads/) [function.fopen]: failed to open stream: No such file or directory in /home/polycys2/public_html/html/swift-mailer/lib/classes/Swift/ByteStream/FileByteStream.php on line 131 Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [uploads/]' in /home/polycys2/public_html/html/swift-mailer/lib/classes/Swift/ByteStream