PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Jul 25, 2017 3:31 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Jul 12, 2007 4:23 pm 
Offline
Forum Newbie

Joined: Thu Jul 12, 2007 1:46 pm
Posts: 1
Yesterday I began switching from PHPMailer to SwiftMailer on the recommendation of someone in my local PHP users group. So far I like SwiftMailer a lot more, especially support for Gmail.

I've had just one small problem with it; SwiftMailer seems to reformat some of my text. For example, a bulleted list which had two spaces before each bullet was stripped of one space. A sentence that was on two lines (separate by a newline) was combined into one line.

Before
Syntax: [ Download ] [ Hide ]
* ABC
  * DEF

  The quick brown fox jumps over the
  lazy dog


After:

Syntax: [ Download ] [ Hide ]
* ABC
 * DEF

  The quick brown fox jumps over the   lazy dog


The method getBody() returns the text exactly as I want it (I assume this is before encoding and processing), but when the email lands in my inbox it's altered. I've tried sending through both Gmail's SMTP server and a vanilla Linux box. I've tried changing the value of setLineWrap() and SetFlowed(false).

I'm running Swift 3.2.6, PHP 5.2.1, and Apache 2.0.59, and this is a plain text email.

Any idea what this could be?

Thanks for your help.


Top
 Profile  
 
PostPosted: Sun Sep 28, 2008 10:21 pm 
Offline
Forum Newbie

Joined: Sun Sep 28, 2008 10:13 pm
Posts: 1
Hi,

I'm having a very similar problem. For me, an extra line is being added.

Here's the text in question:
Quote:
Yours Truly,
the Depity.com folks

P.S. Word of mouth is sweeet... like chocolate... and chocolate is pretty sweet. So tell your friends about Depity!


It's honestly very strange. Sometimes the newline is added before folks, other times its added after word. It seems to depend on the text that precedes it. Just to make sure this is a problem with Swift, I tested sending the same msg string via php's mail function... in that case it was sent properly (without the extra newlines)... not sure why this is happening in Swift.

If you could please reply ASAP!! We're trying to finish this project quickly, and the bug is pretty serious for Plaintext, since these newlines actually show up generating a sort of awkward structure.

I'm using Swift Mailer 3.3.3 with PHP 5.

Thanks!!
Venkat


Top
 Profile  
 
PostPosted: Mon Jul 01, 2013 9:40 pm 
Offline
Forum Newbie

Joined: Mon Jul 01, 2013 9:32 pm
Posts: 2
Hi,

I realize that this topic is 5 years old, but I've just encountered the same problem with an old version of SwiftMailer (3.3.3) that I'm integrating with PHP 5.1.6 on my server. Did you ever find the cause of this issue? I'm getting completely random line breaks in plain text e-mails sent using the SMTP option. When I use PHP's native mail(), although a Content-Type and Charset aren't set, the plain text e-mail renders just fine in all e-mail clients.

Thanks in advance,

FB


Top
 Profile  
 
PostPosted: Tue Jul 02, 2013 11:38 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6457
Location: WA, USA
Are you looking at the emails in a client that likes messing around with line breaks? I know Outlook tends to do that, but it also displays a message to that effect with the option to stop.

And are you looking at the raw email text or just what your client is showing you?


Top
 Profile  
 
PostPosted: Wed Jul 03, 2013 8:16 pm 
Offline
Forum Newbie

Joined: Mon Jul 01, 2013 9:32 pm
Posts: 2
Unfortunately, the random line break issue happens across the board -- Outlook, Gmail, AOL, Yahoo, Hotmail and various web clients. Even if you go to View Original Message or one of the similar options in each of those clients, the breaks are there. For example, this particular block of the plain text e-mail should always display as:

Quote:
Venue Type : Industrial Loft
Description : This is a rentable loft space for retail events.


When I used to send using PHP's mail(), this block always rendered the same way. Now, I get any of the following:

Quote:
Venue Type : Industrial
Loft
Description : This is a rentable loft space for retail events.


Quote:
Venue Type : Industrial Loft
Description :
This is a rentable loft space for retail events.


Another example for a simple sentence in a stand-alone paragraph:

Quote:
As part of our commitment to customer service, you can now reach your dedicated Client Services team from 9 AM - 9 PM.


It displays as any of the below:

Quote:
As part of our commitment to customer service, you can now reach your dedicated
Client Services team from 9 AM - 9 PM.


Quote:
As part of our
commitment to customer service, you can now reach your dedicated Client Services team from 9 AM - 9 PM.


It's so odd.


Top
 Profile  
 
PostPosted: Thu Jul 04, 2013 5:40 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6457
Location: WA, USA
Does it change every time? There must be something causing it to act the different ways. Some difference. Any ideas what that is?

Are you able to send the email to a server where you can view the raw received mail? Like some Linux machine (that you presumably have control over). Seeing the raw message would surely help to see what's going on.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group