eranwein Posted March 1, 2006 Share Posted March 1, 2006 i'm trying to send mail but it doesnt work. this is what i wrote:<? mail('[email protected]', 'My Subject', 'something'); ?>what am i'm doing wrong? Link to comment https://forums.phpfreaks.com/topic/3794-mail-problem/ Share on other sites More sharing options...
klpang Posted March 1, 2006 Share Posted March 1, 2006 [!--quoteo(post=350463:date=Mar 1 2006, 10:02 AM:name=eranwein)--][div class=\'quotetop\']QUOTE(eranwein @ Mar 1 2006, 10:02 AM) [snapback]350463[/snapback][/div][div class=\'quotemain\'][!--quotec--]i'm trying to send mail but it doesnt work. this is what i wrote:<? mail('[email protected]', 'My Subject', 'something'); ?>what am i'm doing wrong?[/quote]should be <?php mail('[email protected]','My Subject', 'something'); ?> Link to comment https://forums.phpfreaks.com/topic/3794-mail-problem/#findComment-13244 Share on other sites More sharing options...
eranwein Posted March 1, 2006 Author Share Posted March 1, 2006 you only changed "<? " to "<?php". well... i've checked it anyway and it doesn't work.thanks anyway. Link to comment https://forums.phpfreaks.com/topic/3794-mail-problem/#findComment-13285 Share on other sites More sharing options...
kenrbnsn Posted March 1, 2006 Share Posted March 1, 2006 The use of "<?" instead of "<?php" just indicates that the OP has short tags enabled.Since the OP is sending to yahoo.com, you should supply at least a "From: " address in the fourth parameter and the domain in it should be the same as the domain of the web site.[code]<?php$from = "From: your name <[email protected]>\n";mail('[email protected]', 'My Subject', 'something',$from);?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/3794-mail-problem/#findComment-13296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.