Phpmailer is a PHP function package that is used to send e-mail messages. Features include: Specify multiple recipients, CC address, send address and reply address, support for multiple message encodings including: 8bit,base64,binary and quoted-printable, support for SMTP authentication, Supports mail with attachments and HTML-formatted messages.
Implementation code:
<?PHPinclude' Class.smtp.php ';include' Class.phpmailer.php ';$mail=NewPhpmailer;$mail->ISSMTP ();//turn on the SMTP service$mail->host = ' smtp.xx.com ';//SMTP server addresses can use SMTP for each large mailbox and have detailed instructions$mail->smtp_port = 25;//SMTP Service port defaults to$mail->smtpauth =true;//turn on SMTP authentication$mail->username = ' [email protected] ';//Email Account$mail->password = ' ... ';//Email Password$mail->from = ' [email protected] ';//The Outbox should match the user name$mail->fromname = ' Mailer ';//Sender Salutation$mail->addaddress (' [email protected] ', ' salutation ');//recipient address and Salutation$mail-WordWrap= 50; //Add Attachment If welcome here Set//$mail->addattachment ('/tmp/image.jpg ', ' new.jpg ');$mail->ishtml (true);//use HTML-style messages$mail->subject = ' Here is the Subject ';//message Header$mail->body = ' This is the HTML message Body <b>in bold!</b> ';//Message Content$mail->altbody = ' The body in plain text for non-html mail clients ';//Email Alertsif(!$mail-Send ()) { Echo' Message could not being sent. '; Echo' Mailer Error: '.$mail-ErrorInfo;} Else { Echo' Message has been sent ';}?>