Jump to content

mail problem


eranwein

Recommended Posts

[!--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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.