Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHPMailer messages returned after upgrade 1

Status
Not open for further replies.

BiJae

Programmer
Oct 1, 2002
154
US
I have a web server that I recently upgraded to UBUNTU 6.06 LTS. I installed post fix and verified that it was passing messages off to my domain server prior to the completion of the upgrade. Near as I could tell things were working fine. I posted all my old content out to the web folders and viola.. My site is updated and more secure...

This morning when our Executive Admin used the Newsletter Mailing program that I gave her she received 226 error messagses:

The following recipient(s) could not be reached:

bijae@att.net on 5/31/2007 10:59 AM
The message contains a content type that is not supported
<tcud-EX1.our.domain.com #5.6.1 smtp;554 5.6.1 Body type not supported by Remote Host>

I've done some looking on the internet but can't find a way to fix this. I have not made any code modifications since the last time it was run on April 30. Here is the code that I'm using:

Code:
	include('class.phpmailer.php');
		foreach($nlm as $nlm) {
			$salutation = $nlm->salutation;
			$lastname = $nlm->lastname;
			//$email = $nlm->homeemail;
			$email = "bijae@att.net";
		
		$mail = new PHPMailer();
		
		$mail->IsSMTP();
		$mail->Host = "localhost";
		$mail->SMTPAuth = false;
		$mail->Username = "";
		$mail->Password = "";
		
		$mail->From = "user@our.domain.com";
		$mail->FromName = "Executive Administrator";
		$mail->AddAddress("$email","$salutation $lastname");
		$mail->AddReplyTo("executive.vadministrator@our.domain.com","Executive Administrator");
		$mail->WordWrap = 80;
		//$mail->AddAttachment("$uploadstring");
		
		$mail->IsHTML(true);
		$mail->Subject = "$month Newsletter";
		$mail->Body = "<html>
							
								<head>
								<meta http-equiv=Content-Type content=\"text/html; charset=windows-1252\">
								<title> </title>
								
								<style>
								<!--
								 /* Font Definitions */
								 @font-face
									{font-family:\"Trebuchet MS\";
									panose-1:2 11 6 3 2 2 2 2 2 4;}
								 /* Style Definitions */
								 p.MsoNormal, li.MsoNormal, div.MsoNormal
									{margin:0in;
									margin-bottom:.0001pt;
									font-size:12.0pt;
									font-family:\"Times New Roman\";}
								a:link, span.MsoHyperlink
									{color:blue;
									text-decoration:underline;}
								a:visited, span.MsoHyperlinkFollowed
									{color:purple;
									text-decoration:underline;}
								@page Section1
									{size:8.5in 11.0in;
									margin:1.0in 1.25in 1.0in 1.25in;}
								div.Section1
									{page:Section1;}
								-->
								</style>
								
								</head>
								
								<body lang=EN-US link=blue vlink=purple>
								
 							<div class=Section1>
							
								<p align=center style='text-align:center'>blah blah blah blah (content of the newsletter goes here)</p>
								</div>
								</body>";
			$mail->AltBody = "The $month Newsletter is available. Please visit the web page [URL unfurl="true"]www.our.domain.com[/URL] to view your copy of this months newsletter";
			if(!$mail->Send()) {
				echo "The message for $salutation $lastname could not be sent. <p>";
				echo "Mailer Error: " .$mail->ErrorInfo;
				exit;
			}

I have a receipt printed out for each of the addresses the message was sent to in a result list page. Each receipt shows that the mailer is working, I just cant get it to go past the exchange server because of the header information.

Can some one give me an idea of what I'm doing wrong? It worked fine last month and this month on a new server with a newer version of postfix I get this message and my newsletters aren't going out.

Any help would be much appreciated.

Thank you!


"If the only prayer you said in
your whole life was, 'thank you,'
that would suffice."
-- Meister Eckhart
 
Can you send a simple (non-PHPMailer complextly-formatted) email from your postfix box via your Exchange Server? Both from the command line on your Ubuntu box and from a script?



Want the best answers? Ask the best questions! TANSTAAFL!
 
Yes, I can send a simple Mail() message from a script. I have some internal programs that I used to test after the upgrade. They get handed off to the exchange server and delivered externally no problem. I have never written a command line message before.


"If the only prayer you said in
your whole life was, 'thank you,'
that would suffice."
-- Meister Eckhart
 
TCUD-EX1 is our exchange server, it's running

Exchange Version 6.5(Build 7638:2) SP2

on

Windows Server 2003 SP2


"If the only prayer you said in
your whole life was, 'thank you,'
that would suffice."
-- Meister Eckhart
 
I'm unable to locate the file with smtp_never_send_ehlo=yes. I've looked in /etc/postfix files: master.cf, main.cf, postfix-files, dynamicmaps.cf, postfix-script, post-install and I cannot locate any reference of ehlo or bit settings. Any idea where I can make the tweak?

The messages are being delivered internally on this exchange server. The letter goes to 5 people in our office and appx 250 members outside our office. All five internal received the message with out error. Does this make it an exchange server problem and not postfix/php?

I assumed that because postfix/php/ubuntu were the only parts that changed it had to be their issue...


"If the only prayer you said in
your whole life was, 'thank you,'
that would suffice."
-- Meister Eckhart
 
Sorry had a newbie moment... (I'm still a little green)

I added the line:

smtp_never_send_ehlo=yes

to main.cf and restarted the service. I ran the script and the mail went out with out errors!

Thank you again for your help, sleipnir214!!! You're always a great help! (most my solutions come from your posts to other members, so thank you for those posts too!!!)


"If the only prayer you said in
your whole life was, 'thank you,'
that would suffice."
-- Meister Eckhart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top