473,698 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

7 New Member
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 2533
ak1dnar
1,584 Recognized Expert Top Contributor
Is it a Error message? when its getting?
May 9 '07 #2
valeberry
7 New Member
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 Recognized Expert Top Contributor
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 Recognized Expert Specialist
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
73763
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 SENDMAIL_FROM = NULL SENDMAIL_PATH = "H:\WINNT\system32\" (this is where sendmail.dll is sitting. H is the drive with w2k)
0
623
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 '/var/lib/mysql/mysql.sock'. i know this looks like a common error and I am terribly sorry if this kind of subject has been posted before but I'll appreciate any urgent help. Thanks Devrim ...
4
26585
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 php-statement is : $conn = pg_connect("dbname=testdb user=bchytrek");
12
10365
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 test from Microsoft as a test for the smtpserver, and it'll send that way. Here's my existing code: Public Sub SendMail() Dim myMailMsg As New Mail.MailMessage()
0
2350
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 time it works fine -- but 20% of the time it fails with the following message: The transport failed to connect to the server. I am setting the mail server via the IP address. It actually is the local mail server, but I didn't want to have any...
5
2492
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 = System.Configuration.ConfigurationSettings.AppSettings("smtpserver") mailmsg.BodyFormat = Mail.MailFormat.Text mailmsg.Subject = "My Subject"
6
26372
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 not to pardner with Earthlink and create their own IP. Since then everything email has been broke. Sprint/Embarq is the only copper wire DSL provider where I live.
2
11484
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 error: SMTP -ERROR: Failed to connect to server: Permission denied (13)
0
2181
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) event = threading.Event() t.start_client(event) event.wait() if not t.is_active(): print 'SSH negotiation failed.'
0
8603
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
9157
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
9027
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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...
0
5860
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
4369
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...
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.