Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  mail problem

phpMyEdit General     mail problem
Post new topic   Reply to topic    
 
vmenonus@yahoo.com     Joined: 09 Nov 2008   Posts: 1  
Post Posted: 2008-11-09 20:05
Back to top  Reply with quote     

I have this code , which is not sending mails.
It is printing values of email address I selected from another form . So _POST and implode is getting values and also "Success" message comes on the screen but I never gets mail.
When I hard code an email id on mail , I gets mail.
Can some one help ?


<?php
error_reporting(E_ALL);
$toSend = implode(",",$_POST['sendmail']);
$toSubject = $_POST['subject'];
$toMessage = $_POST['message'];
$headers = "From: AIM";
print $toSend;
print "<br>";
if($sent = mail($toSend,$toSubject,$toMessage)){
{print "Your mail was sent successfully"; }
}else{
{print "We encountered an error sending your mail"; }
}
?>

 
cbek     Joined: 25 Oct 2008   Posts: 27  
Post Posted: 2008-11-09 21:25
Back to top  Reply with quote     

vmenonus@yahoo.com wrote:
I have this code , which is not sending mails.
It is printing values of email address I selected from another form . So _POST and implode is getting values and also "Success" message comes on the screen but I never gets mail.
When I hard code an email id on mail , I gets mail.
Can some one help ?


<?php
error_reporting(E_ALL);
$toSend = implode(",",$_POST['sendmail']);
$toSubject = $_POST['subject'];
$toMessage = $_POST['message'];
$headers = "From: AIM";
print $toSend;
print "<br>";
if($sent = mail($toSend,$toSubject,$toMessage)){
{print "Your mail was sent successfully"; }
}else{
{print "We encountered an error sending your mail"; }
}
?>


You need to add the header in the Mail function!

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy