473,807 Members | 2,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail() function issue...**URGEN T!

borisding
9 New Member
[MOD: Moved from PHP forum. -pbmods]

Hi there,

Well, I really need help from someone here, and hope that someone will answer my question and solve my problem. I know it's very common question and being asked by many developers:

Basically i keep getting warning message and unable to send out email:
[PHP]Warning: mail(): Failed to connect to mailserver at "mail.xxxx. com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\hosting\xxxx \xxx\thankyou.p hp on line 314[/PHP]

I have already done what i'm supposed to do.
a) changed the setting in php.ini file, that connect to the correct mail server.
b) Added server ip address to relay and allowed to send out email, for aunthentication etc.

Basically, my script is on Server A (not mail server), and need to connect to Server B (mail server) for sending email. After everything done, and restart Server A, it's working and able to send out email. But after end of day, it's unable to send out the mail anymore, yet get the warning message instead. I'm sure the mail server is correct. So,

1) What could be the problem? is it the php installation problem?
2) Why it's not stable, only sustain for one day (next day fail to send out email)?

PS: Current php version is 4.3.9, on Windows server 2000 with IIS support.

Pls help! thanks in advance.
Oct 8 '08 #1
4 2248
Ferris
101 New Member
Maybe there's a firewall on Server B , it regarded your e-mail as a spam.
I suggest you may change an E-Mail account and have a try, to make sure there's no problems in PHP.
Oct 8 '08 #2
pbmods
5,821 Recognized Expert Expert
If your code isn't changing, then it sounds like something is going on on your mail server. I'm going to go ahead and move this thread and let our Linux Experts have at it.
Oct 9 '08 #3
micmast
144 New Member
what mail server are you using?
Oct 9 '08 #4
borisding
9 New Member
Hi Guys,

Thanks for all replies! Anyway, the problem is already. Basically i have decided migrated the php application to the new server.. Thought the Original server is too old and not strong enough to connect to mail Server (what I read from other forums).

Anyway, I didn't change any scripts inside the application,apa rt from some setting in php.ini for new server, of course.|o| Now the problem is solved on the new server..

Thanks.
Oct 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2625
by: Jim Seymour | last post by:
I have a contact form that uses PHP's mail() function. It recently came to my attention that (some?) MS-Windows mail servers may not properly process data given to the mail() function that's only newline-terminated. The mail() function takes up to five parameters: mail(recipient, subject, message, ]) The ones of interest here are the first four. The questions are
2
2387
by: Groupe Eurower | last post by:
Hi, I would like contribute to the PHP development but i don't really know where i can submit my codes ! In fact, i'm a Web Hosting and i authorize the utilisation of the mail() function. Meanwhile, this function permit to send mail anonyme ! (the sender is the apache user in fact)
1
3665
by: tencip | last post by:
Hi everyone, Our setup: PHP 4.3.11, FreeBSD 5.3 RELEASE, Sendmail 8.1, 1 host environment, 2 jails. Our problem: While we can send email from the command line just fine in one of the jails, we cannot use the php mail() command to send email using sendmail at all. The function, when executed, does absolutely nothing. No error, no reports to the maillog, nothing.
6
2287
by: sellam | last post by:
I just installed to a new server and am trying to iron out certain bugs. Right now I have a problem with the mail function. I always get a FALSE return value when I call the mail function. This same code was working on my old server. I've done research and spent hours trying to figure out why it won't work to no avail. Here's what I know:
1
4791
by: crescent_au | last post by:
I am developing a simple mailing system. This requires sending emails in HTML format to one or more recipient. I am currently using PHP's mail() function. It works alright but it doesn't seem reliable. I am not able to send email to my hotmail account but it does send to yahoo account. I'm not sure if there is something about hotmail that blocks emails for some unknown reason. If it goes to yahoo, it must go to hotmail. it doesn't even...
13
21341
Nert
by: Nert | last post by:
hello every one, i need help.. how can i use the mail() funtion in php? when ever i execute the mail function i continuesly receive this error message: what do i need to do in order for me to connect with my localhost mailserver? can anyone help me with this? thanks in advance..(^_^)
2
1105
by: vssp | last post by:
Hai friends When I send the mail with out from address by default it get "nobody@hostname.com . We need to hardcode the from address . But I dont want to edit the php file . Any Possiblity to edit the php.ini file. __________________ Thanks Vssp
1
1522
by: Abersparky | last post by:
Can someone help me with the mail() function??? The below is just to get myself going but I can't seem to get it working... is there something else I should be doing? I checked phpinfo() and the sendmail values are below. Those mean it's turn on right? sendmail_from me@localhost.com sendmail_path
0
1078
by: Ahmad | last post by:
Hello, can any one help me with the following issue: I use PHP mail function to send emails, when I receive these emails I find some exclamation marks (!) added in the text, this is weird. Can any one help me.
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10624
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.