Jump to content

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('myMail@yahoo.com', 'My Subject', 'something'); ?>

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

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

Ken
Link to comment
https://forums.phpfreaks.com/topic/3794-mail-problem/#findComment-13296
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.