mail() Again

Status
Not open for further replies.

1986mi35

New Member
Messages
6
Reaction score
0
Points
0
Hello there I have contacted you a two days ago,enquireing about the mail() funtion, as it is not working... I did get a reply, but it did not solve my problem, I did post and coment to witch I got no responce. I then looked thrue the forums and support requests, all I found was people with the same problem and no solution. You guys are saying that the funciton is enabled, well its not working, this is not due to the spam. I checked the function in following maner if(!mail(xyz)){echo "error";} I am getting an error. This demostrates that there is a problem with function. Can you please provide me with a solution, or a date when you guys will look into it, because my website is depending on sending email ...
 

1986mi35

New Member
Messages
6
Reaction score
0
Points
0
Right the mail function appears to be working now. Thank you for restoring this service.
Here is the code that works, for anyone who might be intrested.

Download php mailer from the link below
http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

require("PHPMailer_5.2.0/class.phpmailer.php");
$mail = new PHPMailer();

$mail->From = "your_emaila_ccount@your_domain.com";
$mail->FromName = "Admin";
$mail->AddAddress("examle@example.com"); // This is the adress to witch the email has to be send.
$mail->Subject = "An HTML Message";
$mail->IsHTML(true); // This tell's the PhPMailer that the messages uses HTML.
$mail->Body = "Hello, <b>my friend</b>! \n\n This message uses HTML !";
$mail->AltBody = "Dear Sir/Madam \n\n This message uses HTML, but your email client did not support it !";

if(!$mail->Send()) // Now we send the email and check if it was send or not.
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
}
 
Status
Not open for further replies.
Top