Click here to Skip to main content
12,892,810 members (62,879 online)
Rate this:
Please Sign up or sign in to vote.
See more: PHP
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
Posted 2-Oct-12 20:28pm
Updated 2-Oct-12 20:29pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100