Mailing error:

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Mailing error:

Post by William »

Im getting a mail error saying: ." Couldn't send eMail! ". Any ideas? I knwo why it put that sence it cant send mail but do you see any errors?

Code: Select all

<?php
$sn = "$id";
$ip = "$REMOTE_ADDR";
$to  = "Email1" . ", " ;
$to .= "Email2" . ", " ;
$to .= "Email3" . ", " ;
$to .= "Email4" . ", " ;
$to .= "Email5" . ", " ;
$to .= "Email6" . ", " ;
$to .= "Email7";
$From = "From-Whoever";
$Subject = "Subject-Here
$Body = "Body-Here";
mail( "$To", "$Subject", "$Body", "From: $From" ) or print "Couldn't send eMail!";
Header( "Location: Redirect-Link-Here" );
?>
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

Code: Select all

$Subject = "Subject-Here";
You're missing a "; after Subject-here.

-Nay
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

oops!

Post by William »

Copty and pasited it wrong fine ill give the hoel script.. Justr pleas enop one use these eMails my friends will kill me, This is for fun and games hehe... Cant etll me noen fo you have ever made a site send you there Ip witch i note thats not illegal right? heres teh PHP code:

Code: Select all

<?php
$sn = "$id";
$ip = "$REMOTE_ADDR";
$to  = "William@TheNetherRealm.com" . ", " ;
$to .= "dead420life@aol.com" . ", " ;
$to .= "jst33390@yahoo.com" . ", " ;
$to .= "wackomatt1212@yahoo.com" . ", " ;
$to .= "xposed69@comcast.net" . ", " ;
$to .= "redragon987@msn.com" . ", " ;
$to .= "biohazardclans@hotmail.com";
$From = "IP Catcher";
$Subject = "You now have $sn's IP!";
$Body = "SN: $sn\nIP: $ip";
mail( "$To", "$Subject", "$Body", "From: $From" ) or print "Couldn't send eMail!";
Header( "Location: Http://www.Geocities.com/the_hidden_viper/template.htm" );
?>
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

Copty and pasited it wrong fine ill give the hoel script.. Justr pleas enop one use these eMails my friends will kill me, This is for fun and games hehe... Cant etll me noen fo you have ever made a site send you there Ip witch i note thats not illegal right? heres teh PHP code:
Erm..........8O?

-Nay
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

eh:

Code: Select all

mail( "$To", "$Subject", "$Body", "From: $From" ) or print "Couldn't send eMail!"; 

// use or die()

mail($me, "you rule", "yeah, nay heredoc and you rocks!", "From: whoelse?") or die ("Could not send mail");
-Nay
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

hehe

Post by William »

probley an OLD version of PHP used tahty found ti on a website longs time ago and wa slookign through odl codes and already knew how to mail but interested so i tryed tio thanks again bye! Only problem is: It works if im only sendin git to 1 person so makes me wonder bye
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

O ya thanks

Post by William »

Thanks forgot to say that i think in last post and i wish i could type as well as i do at coding hehe and dont do good int hat but i manage to type better in it :-P
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Nope...

Post by William »

Nope... Still same so obviosly the or print ""; works just like die somtiems anyways it said same thing im going to bed 4:14 AM night all cya tomarrow
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You have $to and then try and use $To - PHP is case-sensitive so $to != $To.

Mac
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

wow

Post by William »

ill try that thanks :-) takes good eyes to see that one thanks!
Post Reply