swiftmailer

Symfony2 Swiftmailer Not Sending

房东的猫 提交于 2019-12-03 05:48:13
I am having trouble sending emails with symfony2 and swiftmailer. I am also a bit lost on how to debug this issue. Below is the code. First I am creating a form to display. On submit (request->method == post) I then try to send the email. I am getting no errors and it is taking me to the thankyou page, however, I am not receiving any email. I have tested on prod and dev. In dev I have opened the profiler after submission and it shows 0 emails. Any help is appreciated! Thanks! public function contactAction(Request $request) { $defaultData = array('name' => 'Name', 'email' => 'Email', 'subject'

Sending an HTML email using Swift

萝らか妹 提交于 2019-12-03 05:44:10
I would like to send an auto-generated email with HTML body from my application using Swift. Here is my current code: $message = Swift_Message::newInstance() ->setFrom(array('dummy1@test.com' => 'John Doe')) ->setTo('dymmy2@test.com') ->setSubject('some subject'); $message->setBody($this->getPartial('global/mail_partial')); $this->getMailer()->send($message); I had already tried to change the header Content-type of the email message using some specific Swift methods but it is not working. Sarfraz See: Sending a HTML E-Mail (from SwiftMailer Docs) You need to add this line to set html content

Silex SwiftMailer Not Making SMTP Connection Upon Execution

旧时模样 提交于 2019-12-03 05:21:28
问题 I am making a console application which uses the SwiftMail extension to send. Due to our policy, I have two virtual machines, one which serves as a SMTP relay and the other which is the application server. Sending mail manually through telnet to the relay works fine. When using SwiftMail, it's broken. The headers are returned and there are no entries returned in the $failure variable for send() Response of getHeaders()->toString() Message-ID: <1351104631.508838778dc03@swift.generated> Date:

Batch Send Email with SwiftMailer

若如初见. 提交于 2019-12-03 03:27:10
I'm currently using SwiftMailer to send out emails to several users (up to 50). I have it set up and working properly, however, I'm not quite sure how to pull the recipients from my MySQL database and iterate to send them. Here is what I currently have: <?php require_once 'swift/lib/swift_required.php'; $mailer = Swift_Mailer::newInstance( Swift_SmtpTransport::newInstance('smtp.connection.com', 25) ->setUsername('myUserName') ->setPassword('myPassword') ); $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(9)); $message = Swift_Message::newInstance() ->setSubject('Let\'s get together

PHP Library to read email

为君一笑 提交于 2019-12-02 22:22:40
I currently use the SwiftMailer library to send email, but unfortunately it's only for sending, not receiving. I'm wondering... is there a similar library to connect via IMAP to an email account and read the email (IE give me the ability to loop through email). I'm aware there are a set of PHP IMAP functions located here: http://us3.php.net/manual/en/book.imap.php But my question is, does anybody know of an alternative libarary or IMAP wrapper class for receiving/viewing all your emails? I seriously couldn't find anything, thanks in advance. see below ur:-- http://www.php.net/mailparse http:/

Silex SwiftMailer Not Making SMTP Connection Upon Execution

北慕城南 提交于 2019-12-02 17:44:55
I am making a console application which uses the SwiftMail extension to send. Due to our policy, I have two virtual machines, one which serves as a SMTP relay and the other which is the application server. Sending mail manually through telnet to the relay works fine. When using SwiftMail, it's broken. The headers are returned and there are no entries returned in the $failure variable for send() Response of getHeaders()->toString() Message-ID: <1351104631.508838778dc03@swift.generated> Date: Wed, 24 Oct 2012 14:50:31 -0400 Subject: [YourSite] Feedback From: noreply@localhost.com To:

Email goes in spam when I send it via others SMTP server

梦想的初衷 提交于 2019-12-02 17:25:15
问题 I'm using PHP Swift_mailer library to send emails to my customers' clients from behalf of customers. I use their SMTP server, port, login, pass: $transport = Swift_SmtpTransport::newInstance($mail_server['host'], $mail_server['port']); $transport->setUsername($mail_server['username']) ->setPassword($mail_server['password']); It worked pretty well for a few months, but now the emails started to appear in a Spam folder for some of my customers? Is it possible that the reason could be at my end

Email goes in spam when I send it via others SMTP server

限于喜欢 提交于 2019-12-02 11:56:49
I'm using PHP Swift_mailer library to send emails to my customers' clients from behalf of customers. I use their SMTP server, port, login, pass: $transport = Swift_SmtpTransport::newInstance($mail_server['host'], $mail_server['port']); $transport->setUsername($mail_server['username']) ->setPassword($mail_server['password']); It worked pretty well for a few months, but now the emails started to appear in a Spam folder for some of my customers? Is it possible that the reason could be at my end (PHP server) or the problem in in my customer's SMTP server? Thanks in advance! It's because of your

PHPMailer saying could not connect to SMTP host

。_饼干妹妹 提交于 2019-12-02 07:54:19
问题 For the past 2 days I've been trying to get a PHP script to send an e-mail and it doesn't seem to work. First I've tried the normal php mail function, then PHPMailer and then Swiftmailer. I've tried to use both gmail's accounts and SMTP and the email account and SMTP of my internet provider, none worked. I tried to ping both SMTP servers and they worked fine and telnet replied correctly as well. On telnet smtp.gmail.com 587 it said 220 smtp.gmail.com ESMTP q125sm9630397wmd.19 - gsmtp. I've

Override Yii2 Swiftmailer Recipient

北战南征 提交于 2019-12-02 07:36:01
I need to override the recipient email for every instance of Swiftmailer's send() function throughout my Yii2 application. This is for the purpose of load testing. Is there an easy way to do this? Or at least a way to do it without editing Swiftmailer's vendor files? If this is for test only why not set useFileTransport so emails will be saved in the folder of your choice instead of being sent. To do so configure it like this: 'components' => [ // ... 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'useFileTransport' => true, ], ], This will save all emails in the @runtime/mail folder, If