Page 1 of 1

CDO to mail() question

Posted: Sat Jun 03, 2006 10:02 pm
by Milan
What is the best way to convert this to mail()

Code: Select all

$message=new COM('CDO.Message');
    $messageCon=new COM('CDO.Configuration');
    $messageCon->Fields['http://schemas.microsoft.com/cdo/configuration/smtpserver']->value=$smtpserver;
    $messageCon->Fields['http://schemas.microsoft.com/cdo/configuration/smtpserverport']->value=$portnum;
    $messageCon->Fields['http://schemas.microsoft.com/cdo/configuration/sendusing']->value=2;
    $messageCon->Fields['http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout']->value=60;
    $messageCon->Fields->Update();
    $message->Configuration = $messageCon;
    $message->To = $sendtoadr;
    $message->From = $fromadr;
    $message->Subject = $fmsubject;
    $message->HTMLBody = $mstext;
    $message->Send() ;
thanks !

Posted: Sat Jun 03, 2006 10:09 pm
by hawleyjr
Mail is a very very simple function. Check out the manual...

mail()

Posted: Sat Jun 03, 2006 10:15 pm
by Christopher
You also might want to check out the excellent Swift Mailer class from one of our members (who is providing great support -- until he becomes famous ;)) and also the popular phpMailer class.

Posted: Sat Jun 03, 2006 10:25 pm
by Milan
Swift Mailer class worked great!

thanks!

Posted: Sat Jun 03, 2006 10:30 pm
by Christopher
Great. Definitely give d11wtq any feedback you have on those classes.

Posted: Sat Jun 03, 2006 10:32 pm
by Milan
will do!

(tested on godaddy.com with huuuuuuge e-mail files and lists...)

Posted: Sun Jun 04, 2006 7:44 am
by Chris Corbyn
arborint wrote: -- until he becomes famous ;)
:lol: