[FX.php List] PHP send-mail problems
Bob Patin
bob at patin.com
Mon Jul 9 12:43:27 MDT 2012
Sigh... I can't get anything to go through with either PHPMailer or Swiftmailer. Frustrating...
Here's the Swift code I'm using:
<?php
require_once 'lib/swift_required.php';
// Create the Transport the call setUsername() and setPassword()
$transport = Swift_SmtpTransport::newInstance('smtp.longtermsolutions.com', 25)
->setUsername('swiftmailer')
->setPassword('*****')
;
// Create the message
$message = Swift_Message::newInstance($transport)
// Give the message a subject
->setSubject('Test Swiftmailer message')
// Set the From address with an associative array
->setFrom(array('swiftmailer at patin.com' => 'Swiftmailer'))
// Set the To addresses with an associative array
->setTo(array('bob at patin.com', 'info at longtermsolutions.com' => 'recipients'))
// Give it a body
->setBody('Here is the message itself')
;
echo 'Message sent at '.date('h:i:s').'...';
?>
Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
On Jul 9, 2012, at 12:11 PM, Dale Bengston wrote:
> I use Swift as well. Very easy to get set up using their samples and online doc.
>
> Dale
>
> On Jul 9, 2012, at 10:25 AM, Leo R. Lundgren wrote:
>
>> Try using Swiftmailer or PHPmailer. I usually use the former.
>>
>> 9 jul 2012 kl. 17.19 skrev Bob Patin:
>>
>>> I've been using a sockmail script for years, and it's worked great; for some reason, I'm getting huge delays now, so decided I'd look into using something different.
>>>
>>> I found a script that uses PEAR, but it requires a file called PEAR.php, which I don't have and don't know where to download; I assume that since this is PHP 5, PEAR's running on the server, but without this file, I can't make anything work.
>>>
>>> I need to be able to send mail using authentication, which PHP's vanilla SEND doesn't do; does anyone have either a script or whatever I might need to try sending mail using another method?
>>>
>>> Thanks,
>>>
>>> Bob Patin
>>> Longterm Solutions LLC
>>> bob at longtermsolutions.com
>>> 615-333-6858
>>> http://www.longtermsolutions.com
>>> FileMaker 9, 10 & 11 Certified Developer
>>> Member of FileMaker Business Alliance and FileMaker TechNet
>>> --
>>> Twitter: bobpatin
>>> Google+: http://www.longtermsolutions.com/plus
>>> AIM: longterm1954
>>> iChat: bobpatin
>>> --
>>> Expert FileMaker Consulting
>>> FileMaker Hosting for all versions of FileMaker
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>>
>> -|
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list