Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 21. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  mail problem

phpMyEdit General     mail problem
Odoslať novú tému   Odpovedať na tému    
 
vmenonus@yahoo.com     Založený: 09.11.2008   Príspevky: 1  
Príspevok Zaslal: 2008-11-09 20:05
Návrat hore  Odpovedať s citátom     

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     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-11-09 21:25
Návrat hore  Odpovedať s citátom     

vmenonus@yahoo.com Napísal:
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!

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov