Home > php mail > smtp server response 501 syntax error

Smtp Server Response 501 Syntax Error

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about php mail log Stack Overflow the company Business Learn more about hiring developers or posting ads with php mail not working us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.3 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Sending mail failed in php up vote 0 down vote favorite I am trying to send email using mail function in php: $subject = 'testing'; $email = 'test@gmail.com'; $message = 'test message'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: The test site" . "\r\n"; if (mail($email, $subject, $message, $headers)) { $data['msg']="Message send successfully"; } else { $data['msg']="Please try again, Message could not be sent!"; } I Encounter following error: A PHP Error was encountered Severity: Warning Message: mail() [function.mail]: SMTP server response: 501 Syntax error in parameters or arguments Filename: sendemail.php Line Number: 40 I might guess that error was due to not setting configuration required for sending email in php. What should I need to do or I have to change in php.ini file but it's not accesible. Any solution please? php share|improve this question asked Mar 15 '13 at 4:26 CodeManiac 42442349 are u sending mail thru localhost?? –Sriniwas Mar 15 '13 at 4:28 check $message ='test message; it should be enclosed in a quote. –Tepken Vannkorn Mar 15 '13 at 4:29 1 That must be a copy-paste error in the question. If that were the real problem, he'd be getting a syntax error, not an error from the mail() function. –Barmar Mar 15 '13 at 4:30 @Barmar If it was copied and pasted and it's wrong here, it's wrong wherever it came from :) –Ja═óck Mar 15 '13 at 4:31 I meant a typo in the question. You think his real application is sending to test@gmail.com? –Barmar Mar 15 '13 at 4:32 | show 2 more comments 4 Answers 4 active oldest votes up vote 2 down vote accepted $subject = 'testing';

in parameters or arguments If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: Warning: mail(): SMTP server response: 501 Syntax error in parameters or arguments http://stackoverflow.com/questions/15424717/sending-mail-failed-in-php Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 09-13-2005,09:28 AM #1 earunder View Profile View Forum Posts Junior Member Join Date Sep 2005 Posts 1 Warning: mail(): SMTP server response: 501 Syntax error in http://board.phpbuilder.com/showthread.php?10308459-Warning-mail()-SMTP-server-response-501-Syntax-error-in-parameters-or-arguments parameters or arguments Oki this has really bemused me, so any help would be very much appreciated... It is a forgot password form, which is meant to send the user their password via e-mail. I'm in a puzzle as to whether it is down to the Hosting Company as all the Form Mail scripts are not working all bringing up the same error message. The error message is as follows: Warning: mail(): SMTP server response: 501 Syntax error in parameters or arguments in #### on line 40 The code: Code: if(isset($_POST[u2])) { $q1 = "select * from re2_agents where username = '$_POST[u2]' "; $r1 = mysql_query($q1) or die(mysql_error()); if(mysql_num_rows($r1) == '1') { //ok $a1 = mysql_fetch_array($r1); $to = $a1[email]; $subject = "Your password"; $message = "Hello $a1[FirstName] $a1[LastName],\nYour login details are:\n\nUsername: $a1[username]\nPassword: $a1[password]\n\n$site_url"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/"

Open-Realty« v2.x - Community Support - CLOSED General Help (CLOSED) SMTP Server Response: 501 Syntax Error If this is your first visit, be sure to check out http://support.open-realty.org/showthread.php?8074-SMTP-Server-Response-501-Syntax-Error the FAQ by clicking the link above. You may have to register https://www.howtoforge.com/community/threads/smtp-server-response-bad-recipient-address-syntax-state-14.34405/ before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Effective: September 2011 These forums are no longer used! Unregistered, Transparent Techologies is happy to announce we have launced a NEW community support php mail portal to allow customers to communicate, ask questions, and share ideas about all of our products and services. Our new community portal uses the same login information as our Helpdesk and Billing system uses, which means you have a single login to both locations. You can access our NEW community support portal at http://community.transparent-tech.com We have left these OLD forums in a smtp server response read-only state, so users can reference past threads and information going back 10 years all the way to Open-Realty v1.0. If you need assistance with OR v3+ please use the NEW support portal linked above. Results 1 to 3 of 3 Thread: SMTP Server Response: 501 Syntax Error Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 11-21-200506:05 AM #1 agis_k View Profile View Forum Posts OR Hatchling Join Date Dec 2004 Posts 4 HELP : SMTP Server Response: 501 Syntax Error I recently installed the OR 2.0.8 in Windows 2003 server. Whenever I try to send an email through the popup window, I get the following error : Warning: mail(): SMTP server response: 501 Syntax error in parameters or arguments in E:\inetpub\vhosts\gaiopolis.gr\httpdocs\include\mi sc.inc.php on line 434 Since I use a shared hosting package and I don't have access into the php.ini file, is there any other thing I can do? Thank you Agis K. Last edited by agis_k; 11-22-2005 at 04:27 AM. 12-04-200503:15 PM #2 h_man72 View Profile View Foru

1, 2009. abmoller New Member Hi I am trying to config my SMTP server to receiving incoming emails, yet to no avail. I just tried to send an e-mail from a gmail account and this was the server response 501 501 5.1.3 Bad recipient address syntax (state 14) What could be causing this, it is obviously the config of the SMTP server but I don't know what. Pls help! Kind regards FYI - I have been using the http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-fedora-10 . Also I think it could matter that my host is still running on a global IP address ref so the e-mail addresses would be something like [emailprotected] abmoller, May 1, 2009 #1 topdog Active Member HowtoForge Supporter Check your /var/log/maillog, its a misconfiguration causing the mail to be rejected. topdog, May 2, 2009 #2 abmoller New Member topdog said: ↑ Check your /var/log/maillog, its a misconfiguration causing the mail to be rejected.Click to expand... I am getting a line in my maillog: Code: postfix/smtpd[21450]: warning: Illegal address syntax from localhost.localdomain[127.0.0.1] in RCPT command: <[emailprotected]> I am getting the feeling I am overlooking something stupid here. I set the proxy_interfaces setting to 1.2.3.4 since my server behind a NAT. Nothing. What is the difference between editing the settings in main.cf versus postconf -e? Is it the same thing? Also, I can send mail from the server to a gmail account using mailx. When trying to use Squirrelmail to send email from a user account it throws a bad syntax error at me, similar to the server response when trying to send emails to it. What am I missing here?? abmoller, May 2, 2009 #3 topdog Active Member HowtoForge Supporter Please post your main.cf file. topdog, May 3, 2009 #4 abmoller New Member I have the suspicion that postfix rejects all mails to a [emailprotected] address and therefore the Illegal address syntax msg. Can someone confirm this before I post my main.cf file??? abmoller, May 3, 2009 #5 topdog Active Member HowtoForge Supporter abmoller said: ↑ I have the suspicion that postfix rejects all mails to a [emailprotected] addre

Related content

script error in html mail
Script Error In Html Mail p HomeInternet Explorer Internet Explorer Internet Explorer Previous VersionsLibraryForums Ask a question Quick access Forums home Browse forums users FAQ p Php Mail Function Not Sending Email p Search related threads Remove From My Forums Asked by Recently php mail function not working on server started getting script error on certain emails - need debugging help Internet Explorer Internet p Php Mail Not Working On Server p Explorer General discussion Sign in to vote I'm using Windows Live mail client with IE browser on a Win php mail not working localhost -bit platform Just recently

send email error php
Send Email Error Php p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and get php mail error policies of this site About Us Learn more about Stack Overflow the company p Php Mail Error Reporting p Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users php mail returns false no error Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join

sendmail php error
Sendmail Php Error p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more get php mail error about Stack Overflow the company Business Learn more about hiring developers or posting ads php mail error reporting with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack php mail returns false no error Overflow is a community of million programmers just like you helping each other Join them it only

smtp server response 501 syntax error in parameters
Smtp Server Response Syntax Error In Parameters p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business php mail log Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation php mail not working Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute

where to find php mail error log
Where To Find Php Mail Error Log p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the p Php Mail Error Handling p workings and policies of this site About Us Learn more about Stack php mail error reporting Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions php mail returns false no error Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping

´╗┐