Jump to content

Archived

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

eranwein

mail problem

Recommended Posts

i'm trying to send mail but it doesnt work.
this is what i wrote:

<? mail('myMail@yahoo.com', 'My Subject', 'something'); ?>

what am i'm doing wrong?

Share this post


Link to post
Share on other sites
[!--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('myMail@yahoo.com', 'My Subject', 'something'); ?>

what am i'm doing wrong?
[/quote]

should be <?php mail('myMail@yahoo.com','My Subject', 'something'); ?>

Share this post


Link to post
Share on other sites
you only changed "<? " to "<?php".
well... i've checked it anyway and it doesn't work.
thanks anyway.

Share this post


Link to post
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 <youremail@thisdomain.com>\n";
mail('myMail@yahoo.com', 'My Subject', 'something',$from);
?>[/code]

Ken

Share this post


Link to post
Share on other sites

×

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.