PS I did put this in code early on to try and sort problem. \r\n didn't seeem to give me any breaks at in some eamils
$addr = "{$_POST['M_orderaddr']}";
$addr = preg_replace('/\n/', "\t", $addr);
$addr = preg_replace('/\t/', "\n", $addr);
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Same email to two addresses and message spacing is different"
Collapse
-
Cheers chaps. It is definitely only with forwarded mails, though both with same host anyway. Anoying not to know what customer is actually looking at.
Nick, I always have test versions, have a complete test mode version of my site. Right not want to break anything as I have little knowledge of server side stuff although starting to grasp php a bit.
Anyway, if anyone needs a nice short callback script it's all working.
Leave a comment:
-
RFC2821 Simple Mail Transfer Protocol section 2.3.7 says that mail should use carriage return/linefeed (CR/LF, aka "\r\n", hexadecimal: 0D 0A) as end-of-line delimiters, and that SMTP clients should if necessary convert lone CRs or LFs to that form.
However, this is a complex issue and much depends on the configuration and platforms used at each step. For example, some PHP installations will be talking to sendmail directly, but others will be going through a wrapper application of some kind before reaching the SMTP application: in that case, it may well be necessary to use platform-specific line endings (e.g. LF for Unix, "\n", 0A) despite what the PHP documentation says.
As you seem to be getting the problem when the mail is forwarded through your other address, I suspect that the mail server doing the forwarding is incorrectly interpreting the line endings and ends up duplicating at least one of them; it's then down to your mail client how it interprets them. If you examine the raw source of the message with a hex dump utility, you may find that 0D 0A has been turned into something like 0D 0D 0A.
Check your PHP script to see what line endings it's placing in the body of the mail. If it's using "\n" try replacing it with "\r\n", and vice-versa. N.B.: don't make this change to any part of the script that's generating the email headers if they are working correctly: only change the bit that's creating the body of the message.
Rather than messing about with the current script, it would make more sense to extract the relevant code into a separate script where you can experiment to your heart's content. If you find a solution you can then apply that to the existing script, but you don't want to break the existing one.
Leave a comment:
-
I get this occasionally too, found this but I don't know WTF they're all on about to be honest. Double line breaks in mail body [Archive] - CodingForums.com
My webmail is even more annoying, the message looks fine when I send but it arrives without any line breaks at all, it looks like it was typed by a right spaz which doesn't bode well when you're trying to get an agent to take you seriously.
Leave a comment:
-
If I stick my personal email address in the code it's ok. If I stick my company email in which is redirected to the same address I get extra spaces!
Leave a comment:
-
Same email to two addresses and message spacing is different
My RBS Worldpay php feedback thing is almost groovy now apart from one annoying problem. The customer is getting:
Name
Address1
Address2 etc
While in my copy it's
Name
Address1
Address2 etc
It's the same darn message!! Only the recipient, title and headers have changed in the code. Annoying, as want to just cut and past email to create invoice.
Any ideas why it should do this?? Cheers.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: