0

Hi,

I need to send email with authentication. I have downloaded class.smtp.php and class.phpmailer.php files. I have tried to send an email but, i thing i miss something. Therefore, i cant send it. Can anyone help me to do this?

Thanks guys

1-What settings do i need to do in above files?
2-What do i write in sendEmail.php file to run this project? Any sample code!

myemail=myemail@myhost.com
myhost= mail.myhost.com
port=25
username=myName
password=myPasw

2
Contributors
2
Replies
4
Views
9 Years
Discussion Span
Last Post by veledrom
0

The script should look something like (notice I substituted your variables in):

$mail = new PHPMailer();
//SMTP begin
$mail->IsSMTP();                                      // set mailer to use SMTP
$mail->Host = "mail.myhost.com";  // specify main and backup server
$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->Username = "myName";  // SMTP username
$mail->Password = "myPasw"; // SMTP password
//SMTP end
//mail begin
$mail->From = "myemail@myhost.com";
$mail->FromName = "veledrom";
0

didn't work. I am wondering do i have to do changes in main class file as well. i did some but, still problem.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.