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

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";

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.