473,237 Members | 1,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

Failed to connect to mail server error for mailing list using PHP

Expand|Select|Wrap|Line Numbers
  1.  //Index.php 
  2. <html><head><title>Mailing List Administration</title></head><body>
  3. <br>
  4. <center><H1>Mailing List Administration</H1></center>
  5. Send an email to a mailing list:
  6. <form method=post action="sendemail.php3">
  7. <table><tr><td>
  8. <b>From Address:</b>
  9. <input type=text name="From" size="40" value="">
  10. <br>
  11. <b>Subject:</b><input type=text name="Subject" size="40">
  12. </td><td><table cellspacing=15><tr><td valign=top>
  13. <b>List:</b> 
  14. </td><td>
  15. <select name="List" size=4>
  16. <? 
  17. $groups = file("lists.txt"); 
  18. for ($index=0; $index < count($groups); $index++)
  19. {
  20. $grouplist = split("\|", chop($groups[$index]));
  21. ?>
  22. <option value="<? echo $grouplist[1] ?>"
  23. <? if ($index==0)
  24. {echo "selected";} ?>
  25. <? echo $grouplist[0] ?><br>
  26. <?
  27. }
  28. ?>
  29. </select></td>
  30. <td valign=top><b><a href="newlist.php3">Make a new list.</a></b>
  31. <br><a href="addnames.php3">Add names to a list</a>.
  32. <br><a href="picklist.php3">Edit/Delete names</a>.
  33. <br><a href="data.txt">View Send Log</a>.
  34. <br><a href="autoresponder.php3">View/Edit Autoresponder</a>.
  35. </td></tr></table>
  36. </td></tr></table>
  37. Type or paste your message below:
  38. <br><textarea cols=50 rows=10 name="Body"></textarea>
  39. <br><br>
  40. <input type="submit" name="Submit" value="Send Mail">
  41. </form>
  42. <br>
  43. </body></html>
  44.  
  45. //send email.php
  46. <html><head><title>Updating file....</title></head><body>
  47. <?
  48. $addresses = file("lists/$List");
  49. for ($index=0; $index < count($addresses); $index++)
  50. mail("$addresses[$index]","$Subject",
  51. "$Body","From: $From\nReply-To: $From");
  52. }
  53. $myfile = fopen("data.txt","a");
  54. fputs($myfile,$Subject."\t".date("dS of F Y h:i:s A")."\t".$List."\n");
  55. fclose($myfile); 
  56. ?>
  57. Your message was sent!
  58. <br><br>
  59. <a href="index.php3">Home</a>.
  60. </body></html>
  61.  
Error message was a warning.

Here's printscreen of the error msg.
http://i179.photobucket.com/albums/w...i/errorMsg.jpg
May 9 '07 #1
4 2451
ak1dnar
1,584 Expert 1GB
Is it a Error message? when its getting?
May 9 '07 #2
Is it a Error message? when its getting?
Yes.
It seems like I hav to configure some port in outlook express.
Howeer, I'm unsure how to do so.
May 9 '07 #3
ak1dnar
1,584 Expert 1GB
PHP mail() function allows you to send mails over a Configured SMTP server.There is no relation with outlook and its ports with php mail.
If you trying to send mails over your Local web server refer to the php.ini file for the SMTP configuration.
Or your web server is a Internet based one check with your vendor whether php mail is enabled or not.
May 9 '07 #4
Motoma
3,237 Expert 2GB
You will need to set up an SMTP server, and configure PHP to work with it before mail() will function correctly.
May 9 '07 #5

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

Similar topics

6
by: aa | last post by:
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini in php.ini I have: SMTP = localhost SMTP_PORT = 25...
0
by: D. K. | last post by:
Hi; I have installed suse 8.2 a short while ago and at my first attempt to connect mysql (via shell and a perl dbi script) i get following error: can't connect to mysql server through socjet...
4
by: Bogdan Chytrek | last post by:
Why happens this? Warning: pg_connect() unable to connect to PostgreSQL server: FATAL: IDENT authentication failed for user "bchytrek" in /var/www/html/physio2/test.php on line 19 The...
12
by: James Lankford | last post by:
Hello group: I have reached the end of my rope with this error. I have pretty much tried every suggestion I've found thus far and I get this error no matter what I do. I did try using the CDOSYS...
0
by: Lori McDonald | last post by:
I have code that I am using to sent an HTML email. (see code below) Intermittently I am getting the following error when I try and send an email message from ASP.Net code on my server. 80% of the...
5
by: Nathan Sokalski | last post by:
I am attempting to send an email using ASP.NET 1.1's Mail.SmtpMail.Send() method. My code contains all of the following: Dim mailmsg As New Mail.MailMessage Mail.SmtpMail.SmtpServer =...
6
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided...
2
by: jephperro | last post by:
Hi there, I have a problem using PHPMailer. On my local development machine, the script works fine and sends emails. On amy staging server, when I try to use PHPMailer to send() I see the...
0
by: sa6113 | last post by:
I am using this code to connect to a windows machine using paramiko, I have installed sshd on the machine and it works properly: sock.connect((hostname, port)) t = paramiko.Transport(sock)...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.