Failed to send email using mail()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pondering
Forum Newbie
Posts: 2
Joined: Fri Jul 20, 2007 6:08 am

Failed to send email using mail()

Post by pondering »

Hi, all.

These days I have been trying to use PHP to send emails but failed.

I have Mercury&Apache installed on my PC. Since I have not acquired a domain name yet, IP address is present in the email address, that is, admin@x.x.x.x(my IP). Though I can successfully send mails to myself using the email address admin@x.x.x.x as both the sender and recipient, I cannot send out emails to others such as someone@somedomain.com. What is more, I use the simple PHP built-in function mail() to send emails.

Now I am wondering whether I must have my own domain name before sending emails to others.

Can I send out emails using my own email server Mercury without having to get a domain name?
If not, how to send emails using an existing email server in which I already have an email account?

Thanks in advance.

BR,
Pondering
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Is the mercury server configured to relay mails to "the outside world"?
pondering
Forum Newbie
Posts: 2
Joined: Fri Jul 20, 2007 6:08 am

Post by pondering »

Yes.
Here is some info from its config file:
==================================================
[MercuryS]
Debug : 1
Logfile : d:\Program Files\xampp\MERCURYMAIL\Logs\MERCURYS.LOG
Timeout : 30
Relay : 1
Strict_Relay : 0
Interface : (there is my IP)
Allow_Illegals : 0
SMTP_Authentication : 0
Compliance_Settings : 0
Maximum_Failed_Rcpts : 4
Max_Relay_Attempts : 4
SSL_Mode : 0
ST_Blacklisting : 288
No_VRFY : 0
==================================================
(Mercury cannot be started at the moment so I pasted the above settings.
I don't know why it went wrong. I find there is a log file named "MERCURYS.LOG"
but it does not contain any error messages helping me get the reason... )
Post Reply