swiftmailer

batch email send with response

I want to send out batch mails using SwiftMail or any similar system. The SwiftMailer docs state that: "Each recipient of the messages receives a different copy with only their own email address on the To: field. An integer is returned which includes the number of successful recipients." http://swiftmailer.org/docs/batchsend-method I ...

Retrieving a file name to attach to an email with SwiftMailer and PHP

I am able to attach a file using SwiftMailer with its name hardcoded. But what if the file is uploaded by a user from an HTML form's 'file input type control and has to be sent with an email by a PHP script? How do I specify the file name in SwiftMailer? Thank you! ...

Retrieving a file name to attach to an email with SwiftMailer and PHP

I asked the question yesterday and got an advice, and used it, but it doesn't work for some reason. So, I need to retrieve the name of the file that was uploaded to my server from an HTML form by a user. I need this file to be attached to an email that is to be sent by PHP/SwiftMailer. Here is my code, the file upload portion: //F...

SwiftMailer problem

I use SwiftMailer in my PHP script to send emails upon HTML form submission. On the test server it all works fine. On the production server (different host) it gives me this error message: Parse error: syntax error, unexpected T_CLASS in /home/alkal5/public_html/html/swift-mailer/lib/classes/Swift.php on line 18 What could it...

How to get started using SwiftMailer

I wanna use swiftmailer to send the results of a form to a gmail account. I'm new to php (and new to ubuntu), and in the stage of being (embarrasingly) lost even when reading the documentation. Questions: a) Where do I extract the library? I placed it on my desktop. Shouldn't it go in some apache folder? b) How would a sample messa...

Using php's swiftmailer with gmail

I'm writing a simple script in which a gmail account is used to send an email to itself. I altered the script from SwiftMailer's reference, but I'm not getting any results. What's wrong? Edit: after further debugging I've found that the statement $result = $mailer->send($message); causes the code to fail (the echo below it doesn't...

trying to send mail using swift mailer, gmail smtp, php

Here is my code: <?php require_once 'Swift/lib/swift_required.php'; $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465) ->setUsername('[email protected]') ->setPassword('pass'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('Wonderful Subject') ->setFrom(array('[email protected]' => 'MY ...

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

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...

Swiftmailer won't send mail, but mail() will

PHP's mail() function sends mail fine, but Swiftmailer's Swift_MailTransport doesn't work! This works: mail('[email protected]', 'test '.date('H:i:s'), ''); But this does not: $transport = Swift_MailTransport::newInstance(''); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('test '.date('H:i:s')...

install sfSwiftPlugin for Symfony 1.4

I am using Symfony 1.4 as PHP framework, with Propel as ORM. I downloaded sfSwiftPlugin 1.5.1, but it was for 1.o version, and when installing it is giving me error you try to install a symfony 1.0 plugin. how can in upgrade the Plugin, or is there any other plugin for mailing purpose. Can we use the core PHP Mail function, in Symfony? ...

creating custom message body in Swift Mailer

I am using PHP Swift Mailer to send Mail to my user, whose email and name are stored in my database, I am able to send them mail using SwiftMailer's batchSend() method. but i want to send every mail body to be specific to each user like example.. if i have 3 user with name and email(user1=> [email protected], user2=> [email protected], us...

How can I keep track of mail sent using PHP Swift Mailer?

I am using PHP Swift Mailer to send a bulk mail to a set of users. But I am not able to keep track of sent mail. My code: <?php require_once("includes/database.class.php"); require_once("lib/swift_required.php"); $con=DBClass::getConnection(); $db=DBClass::getDatabase($con); $login_id="myloginname"; $password="mypassword"; $to_mail...

cakephp swiftmailer config

hi i am using swiftmailer component in my app and am looking for a way to have a separate config (perhaps in config folder?) for swiftmailer that checks what debug mode i am using and thus uses different settings? case 1: on production mode use simple smtp server without auth. case 2: on debug mode use gmail settings or other settings s...

Why does this properly formatted html mail becomes garbled text when forwarded?

I'm using Swiftmailer to send the contents of a form to a gmail account. The text appears as good html when first received but it turns into a garbled mix of html code and form contents when forwarded. Why is this? How can it be solved? The message is something like: $cuerpo_de_mensaje = "<h1>Resultado de Evaluaci&oacute;n de Curso "....

Swiftmailer subject and weird whitespace problem

Hey When sending a message with swiftmailer or SmtpMailer, the subject has a weird whitespace. The subject should look like this: "Newsletter October 2010 - Hello everyone" But looks like this: "Newsletter October 2010 - Hello everyo ne" The whitespace always comes up the same place. PHPmailer does not have the whitespace, but we ...