473,244 Members | 1,335 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,244 software developers and data experts.

mail error when using PHP

Howdy!

I've encountered an odd error, and it seems to happen only when PHP is used
to send email. I'm using PHP 4.1.2 on RH 7.1. The problem is best seen when
OS Commerce generates email.

Specifically, email that is sent to a local mailbox has the 'F' removed from
the "From " header (I think this is the very first character in email
messages). With the 'F' missing, the mail file is obviously corrupted. For
now, I've resorted to using sed() and lockfile to fix it.

When I had a little time some months ago, I spelunked through the OSC code;
it seems the problem is within a PHP mail handling function.

Has anyone ever seen this? What can I do to fix it? (Or, more politely,
where can I look to learn how to fix it?)

Clueless in Virginia's technological backwater,
Neal
Jul 17 '05 #1
3 1920
In article <h7********************@adelphia.com>,
ne***********@alum.wpi.edu says...
Howdy!

I've encountered an odd error, and it seems to happen only when PHP is used
to send email. I'm using PHP 4.1.2 on RH 7.1. The problem is best seen when
OS Commerce generates email.

Specifically, email that is sent to a local mailbox has the 'F' removed from
the "From " header (I think this is the very first character in email
messages). With the 'F' missing, the mail file is obviously corrupted. For
now, I've resorted to using sed() and lockfile to fix it.
No, the 'From:' header is usually in the center or lower of the headers.
There are a bunch of trace headers before it indicating where the email
has been in transit.


When I had a little time some months ago, I spelunked through the OSC code;
it seems the problem is within a PHP mail handling function.

Has anyone ever seen this? What can I do to fix it? (Or, more politely,
where can I look to learn how to fix it?)


It may be a problem in what is passed to mailto as additional headers.
It can take a "From:" as one of these and overwrite its default value.

Check the 'F' is actually getting passed in, if it isn't being passed at
all you might solve the problem by setting the header yourself this way.

Format for that header is:
'From: "Name Here" <ad**@domain.whatever>\n'

Quoted String "Name Here" is optional, address can be '<>' if no bounce
is ever wanted.

To prevent bounces with <>, but allow manual replies there is "Reply-
To:" with same format as "From:"

--
AJ
Treehouse Networks abuse@
www.treenetnz.com
Jul 17 '05 #2
TreeNet Admin wrote:
In article <h7********************@adelphia.com>,
ne***********@alum.wpi.edu says...
Howdy!

I've encountered an odd error, and it seems to happen only when PHP is used
to send email. I'm using PHP 4.1.2 on RH 7.1. The problem is best seen when
OS Commerce generates email.

Specifically, email that is sent to a local mailbox has the 'F' removed from
the "From " header (I think this is the very first character in email
messages). With the 'F' missing, the mail file is obviously corrupted. For
now, I've resorted to using sed() and lockfile to fix it.

No, the 'From:' header is usually in the center or lower of the headers.
There are a bunch of trace headers before it indicating where the email
has been in transit.
When I had a little time some months ago, I spelunked through the OSC code;
it seems the problem is within a PHP mail handling function.

Has anyone ever seen this? What can I do to fix it? (Or, more politely,
where can I look to learn how to fix it?)

It may be a problem in what is passed to mailto as additional headers.
It can take a "From:" as one of these and overwrite its default value.

Check the 'F' is actually getting passed in, if it isn't being passed at
all you might solve the problem by setting the header yourself this way.

Format for that header is:
'From: "Name Here" <ad**@domain.whatever>\n'

Quoted String "Name Here" is optional, address can be '<>' if no bounce
is ever wanted.

To prevent bounces with <>, but allow manual replies there is "Reply-
To:" with same format as "From:"


Don't forget that all lines *must* end <CR><LF> - that's \r\n

It's in the standard, even though some mail servers don't enforce it.

Steve
Jul 17 '05 #3
TreeNet Admin <cl*@treenetnz.com> wrote:
I've encountered an odd error, and it seems to happen only when PHP is used
to send email. I'm using PHP 4.1.2 on RH 7.1. The problem is best seen when
OS Commerce generates email.

Specifically, email that is sent to a local mailbox has the 'F' removed from
the "From " header (I think this is the very first character in email
messages). With the 'F' missing, the mail file is obviously corrupted. For
now, I've resorted to using sed() and lockfile to fix it.


No, the 'From:' header is usually in the center or lower of the headers.
There are a bunch of trace headers before it indicating where the email
has been in transit.


What makes you think the OP is talking about the 'From: ' header, he
specifically states the 'From ' header in a local mailbox. That is the
first line in a mbox format:
From me@example.com Sat Nov 27 13:00:00 2004
When I had a little time some months ago, I spelunked through the OSC code;
it seems the problem is within a PHP mail handling function.

Has anyone ever seen this? What can I do to fix it? (Or, more politely,
where can I look to learn how to fix it?)


Your software is ancient, my guess is you have a software bug, either in
php (research bugs.php.net) or in you MTA. Get out your tools like
ethereal and reading the mailspool dir to see what is acutally being
transmitted.

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wayno | last post by:
Hoping someone can help me out with this problem. First problem, is I am unable to view my php error log. In my php.ini I have my log in /var/www/logs/php_error_log. However, it has remained empty....
16
by: polilop | last post by:
I made a form in which I send the visitor a link to my page but when the visitor gets that link in the mail it dosent send him to the page just says invalid syntax or something like...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
9
by: B-Dog | last post by:
I've built a small app that sends mail through our ISP's SMTP server but when I try to send through my local exchange server I get CDO error. Does webmail use SMTP or does it strictly rely on...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
3
by: Ibrahim. | last post by:
Hello, Im getting the following error when mail is sent from ASP.NET 2.0 website. CDO.Messaging componenet is used for sending mail. " The message was not able to be transmitted to the SMTP...
5
by: Robert Dufour | last post by:
I am trying to use framework 1.1 - stuck with it. to send emails from a windows form application. The email messages can have attachments, usually two and they can be either text or sounds (wav...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
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...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
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:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.