Jump to content

Mail () Problem At Line 10

Recommended Posts

Hi allI cannot send email from a form to my inboxHTML code:

<html><link href="school.css" rel="stylesheet" type="text/css"><body><table width="400" border="0" align="center" cellpadding="3" cellspacing="3"> <tr> <td><form id="form1" name="form1" method="post" action="email01.php"> <table width="400" border="1" cellpadding="7" cellspacing="3" bordercolor="#990000"> <tr> <td colspan="2" bgcolor="#FF9900"><h1>Send us your feed back:</h1></td> </tr> <tr> <td valign="top">Name:</td> <td><label> <input type="text" name="urname" id="urname" /> </label></td> </tr> <tr> <td valign="top">Email:</td> <td><label> <input type="text" name="uremail" id="uremail"> </label></td> </tr> <tr> <td valign="top">Message:</td> <td><label> <textarea name="urmessage" id="urmessage" cols="45" rows="5"></textarea> </label></td> </tr> <tr> <td colspan="2" align="center" valign="top"><label> <input type="submit" name="button" id="button" value="Send Your Message" /> </label></td> </tr> </table> </form> </td> </tr></table></body></html>
And my PHP code is this:
<?php$to = 'myemail@yahoo.com';$name = $_POST['urname'];$email = $_POST['uremail'];$message = $_POST['urmessage'];$headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();mail($to, $name, $email, $message, $headers);?>
The error I get is:
Warning: mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. in E:\inetpub\vhosts\fazlionline.com\httpdocs\school\email01.php on line 10
Is there anything missing in my code?Need help Edited by fazlionline

Share this post

Link to post
Share on other sites

In order to send email, PHP connects to an SMTP server. That SMTP server is the problem, as you can see by the error message. Your PHP is fine. Check your settings in php.ini, or if this is with a host, contact your host.

Share this post

Link to post
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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