linux - unable to send mail from server usiong php mail in html format -


i trying send mail using php mail function works below code:

<?php $to = "abhwebdesign@gmail.com"; $subject = "subject"; $password="xxxxx"; $message = " <html> <head> <title>html email</title> </head> <body > <div style='width:670px;height:450px;padding:50px;background-color:#efefeb;'> <div style='width:600px;height:450px;background-color:#ffffff;color:#105b94;font-size:20px;padding:10px'> <img src='http://www.example.com/images/index/logo.png' /> <p>hi,</p> <table style='color:#105b94;font-size:20px;'> <tr> <td><p>thank registering us.</p></td> </tr> <tr> <td><br>your password :$password<br><br>we appreciate interest. </td> </tr> <tr> <td><hr>contact <br>office :9999999999<br>www.example.com </td> </tr> </table> </div> </div> </body> </html> ";  // set content-type when sending html email $headers = "mime-version: 1.0" . "\r\n"; $headers .= "content-type:text/html;charset=utf-8" . "\r\n";  // more headers $headers .= 'from: support <support@example.com>' . "\r\n";   mail($to,$subject,$message,$headers); ?> 

the code works if remove www.example.com above code in line "office :9999999999
www.example.com
" please me.

i recommend use: http://swiftmailer.org/

this includes mail headers , configurations. manages stuff don't want see.

kind regards!


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -