Click here to Skip to main content
15,072,209 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I had a problem in sending email using php to squirrelMail only but i can able to send mails others like gmail,yahoo etc..I need code for this
Updated 2-Oct-12 20:29pm

1 solution

This has no sense at all, sending an e-mail is easy and squirrel mail is only a mail client.
It is like you would say that sending an e-mail to outlook would not be possible...

I'm using this PHP code to send mails and it works perfectly for me:

$headers  = "Date: ".date("l j F Y, G:i")."\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "From: your_company_name <>\n";
$headers .= "MIME-Version: 1.0\n";
$MailContent = "asdasdasdasdasda";
$sentOK = mail("","Subject",$MailContent,$headers);

Look for samples in the Internet (use google) to get more examples on how to send mails using PHP and see if the mail address used with the squirrel mail client has not been blocked in your mail server.

Good luck!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900