Jump to content


Photo

mail problem


  • Please log in to reply
3 replies to this topic

#1 eranwein

eranwein
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 01 March 2006 - 02:02 AM

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?

#2 klpang

klpang
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 01 March 2006 - 10:44 AM

[!--quoteo(post=350463:date=Mar 1 2006, 10:02 AM:name=eranwein)--][div class=\'quotetop\']QUOTE(eranwein @ Mar 1 2006, 10:02 AM) View Post[/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'); ?>

#3 eranwein

eranwein
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 01 March 2006 - 02:18 PM

you only changed "<? " to "<?php".
well... i've checked it anyway and it doesn't work.
thanks anyway.

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 01 March 2006 - 03:09 PM

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.

<?php
$from = "From: your name <youremail@thisdomain.com>\n";
mail('myMail@yahoo.com', 'My Subject', 'something',$from);
?>

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users