Knowledge Base Home  l  Web Hosting  l  Softwares  l  WHM  l 

Sending the mail through smtp Authentication from php
Category : Web Hosting

For the security pupose we have blocked all outgoing mail without smtp authentication from php. If you want to send mail through php, kindly create a email id in your cpanel.

Use that email id and password in your php code to send mails from php. samples code is given below.

$from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo('
' . $mail->getMessage() . '

'); } else { echo('
Message Sent successfully
Thank you.
Please Visit Again!
'); } ?>


Growing Business Circle™
Click here for more ....
      
     Category
 
Web Hosting  l   Softwares  l   WHM  l  
  Most Recent Articles

» Send the mail using the SMTP authentication through php

» This message is to inform you that the account xxxxxx has user id 0 (root privs)

» Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\INETPUB\VHOSTS

» call-time-pass-by-reference error after updating the php to php 5.4

» spamming through exim, Exim is down , /var drive is full

      Popular Articles

» Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\INETPUB\VHOSTS

» call-time-pass-by-reference error after updating the php to php 5.4

» spamming through exim, Exim is down , /var drive is full

» Free back up software for windows (Windows 2003 server, Windows Xp)

» How to create new email id under the HELM control panel – AdsinMedia Hosting

» How to configure the mail id in microsoft outlook express

» How to delete the mail from outgoing folder of Microsoft outlook

» SMTP error Codes

» How can I use the new server while I change the DNS server of a domain.

» Spamd spamassassin shutting down automatically





Copyright © 2014 Adsin Technologies. All rights reserved. Powered by business adsleaf