Jump to content

problem with php mail()


shrayyef1790

Recommended Posts

i'm running php 5.3 in wamp server with windows xp sp3

 

<?php

 

 

$Name = "my name"; //senders name

$email = "[email protected]"; //senders e-mail adress

$recipient = "[email protected]"; //recipient

$mail_body = "The text for the mail..."; //mail body

$subject = "Subject for reviever"; //subject

$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

 

ini_set('sendmail_from', '[email protected]'); //Suggested by "Some Guy"

ini_set('SMTP', 'smtp.gmail.com'); //Suggested by "Some Guy"

ini_set('smtp_port', 465); //Suggested by "Some Guy"

 

$result = mail($recipient, $subject, $mail_body, $header); //mail command :)

return $result;

?>

 

some one help me please

Link to comment
https://forums.phpfreaks.com/topic/259116-problem-with-php-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.