I am using XAMPP 1.7.4 on Windows 8 When Mail Script is executed I got error Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry however this code works very well on live server
So what can be the issue ?
Thanks in advance for helping me.
Well, the error says it all. The SMTP server you're connecting to replies, that it doesn't relay non-local mail. So whatever SMTP server you've configured, it doesn't like it when the sending party is non-local, p.e. localhost or 127.0.0.1.
It doesn't seem to be an error in your code, it is more likely a configuration error in your script or in the SMTP server you want to relay to.
Related
Hi guis I have been migrating an application to new server, is an Ubuntu server but on the new server I have some problem to send emails using Cakephp 2.0.
If the host on cake mail config is localhost I have the following error:
SMTP Error: 530 5.7.0 Must issue a STARTTLS command first
Search on the internet the solutions may be is config SMTP ssl://mydomain.com.br on php.ini or using ssl host like this ssl://mydomain.com.br on cake mail config. On the first option nothing change, error persist and with host ssl on cake mail config I have the following error:
Unable to connect to SMTP server.
I make a simples test using only php mail() function and the email is been sent.
On this server I config postfix and dovecot may be this can be the problem?
you can use 'PHPMailer'.
it's simple and easy.
https://github.com/PHPMailer/PHPMailer
I would like to send this email.
I have seen configuration but not sure what to do or make any heads or tails out of them. The mail would be sent from my PC right now.
Error I get is - Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\send.php on line 165.
http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html
http://forums.devshed.com/mail-server-help-111/how-to-set-up-php-ini-to-send-mail-from-106329.html
Looked on these two sites from google search but don't acutally understand it. Can some help me please.
You're trying to send mail from your localhost (Your PC) It's not setup to send mail. Move the script to a production server and it will work
You don't have a mail server installed. You have a few options:
Install a mail server such as Postfix or sendmail
Connect to an existing SMTP server, for example through Gmail. (See: Send email using the GMail SMTP server from a PHP page)
I am using WAMP on my local computer and I want to use my web hosting smtp.domainname.com to test sending email from my localhost. I have already set smtp, and its port number in php.ini.
it shows the following error.
==================================
( ! ) Warning: mail( [function.mail]: SMTP server response: 550 bosauthsmtp14: Host ipaddress : No unauthenticated relaying permitted in C:\wamp\www\client\email_test.php on line 7
=================================
I am using mail("you#you.com","subject","body").
I am completely new to SMTP. Can anyone help me..
Most webhosts don't allow the requests to originate outside their server farm. Have you checked to make sure they allow this? The error message 550 is "Unable to relay." This would seem to indicate they aren't accepting your request to send an email.
Getting error message
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in
Ive opened up php.ini and i believe i need to add
SMTP "localhost" PHP_INI_ALL
smtp_port "25" PHP_INI_ALL
sendmail_from NULL PHP_INI_ALL
sendmail_path NULL PHP_INI_SYSTEM
Im not sure where to add it though? Also correct me if anything i believe i need to do is incorrect. Im currently developing website on localhost so if anything i need to please tell me.
EDIT**
My local host is XAMPP amd i believe this has a mail server
You're probably not running an SMTP server on your localhost.
If you only need an SMTP server for development purposes, and you're running Windows, install smtp4dev, which can be found here: http://smtp4dev.codeplex.com/
It's a beautiful little piece of software that sits in your task bar and lets you see all email that is being sent to it. It doesn't actually send email anywhere, so you can work with live data without fear of spamming someone.
Then, when you want your application to actually send email (when you run it on the server), you will need an SMTP server address instead of "localhost". If you don't know which SMTP to use, speak to your network administrator or ISP.
Last but not least, if you access your email through an email program, you can probably find the "Outgoing server" in your settings somewhere, although that depends on which mail program you use. An "SMTP server" and an "Outgoing server" are exactly the same thing.
You can't send mail from your local computer if you don't have a mail server running on it. Just like everyone else has said: Make sure you have a mail server that is properly configured and up and running on your local computer, or install it on a remote computer and change the IP address/port to point to the remote computer.
You can add smtp configuration at any place, but it is a good idea to search for [mail function] section in that file and add that below. Also,
SMTP = *smtp server addr here*
smtp_port = 25
If you are not using XAMPP or some other packet of that kind, it's unlikely that you have smtp server up and running on localhost.
you have to install a Mail Server Program to your comp.. Localhost does not support send mail in default way
i am trying to use localhost to send mail. however, i am getting this error when sending:
Warning: mail() [function.mail]: SMTP server response: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1). i have smtp settings correct in php.ini and am just confused as to what this means. thanks
There seem to be two primary reasons for this.
The first has to do with the email client configuration (google INVALID HELO OUTLOOK).
The other reason is an improperly configured SMTP server where the server sends out emails with only the server name and not a fully qualified name (e.g., emailserver vs emailserver.mydomain.com).
You should contact your hosting company and give them as much detail as you can. They should be able to help.
If you are using cPanel, you can disable HELO checking. See the user guide. The trade off is you will receive more spam...
I had a similar problem with postfix in Ubuntu. It turned out that I'd not set 'myhostname' in the postfix configuration file.
The problem disappeared when I configured 'myhostname' in the following file:
/etc/postfix/main.cf