Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:57:52+00:00 2026-06-08T00:57:52+00:00

I am trying to send plain text emails to a company who will be

  • 0

I am trying to send plain text emails to a company who will be processing them for me. I am using the Swift Mailer library and as far as I can tell – I have no problems. But the company that I am sending the messages to says that they are coming into them with all of the data on a single line. When I send myself an email using this script it looks perfect – each piece of data is on a separate line.

Here is the script I am using. It is very simple.

<?php   
$to="";

$bcc="";

$subject = "Quote" ;

$domain = $_SERVER['HTTP_HOST'];

    //Message
$message = "Domestic Quote Request\n";
$message .= "Full Name: $_POST[name]\n";
$message .= "Email: $_POST[email]\n";
$message .= "Phone: $_POST[phone]\n";
$message .= "Pickup Date: $_POST[shipdate]\n";
$message .= "Pickup City or Zip: $_POST[pickupzip]\n";
$message .= "Drop Off City or Zip: $_POST[dropoffzip]\n";
$message .= "Year: $_POST[vehicleyear]\n";
$message .= "Make: $_POST[vehiclemake]\n";
$message .= "Model: $_POST[vehiclemodel]\n";
$message .= "Carrier Type: $_POST[carriertype]\n";
$message .= "This Quote is from $domain";


require_once 'lib/swift_required.php';

// Create the Transport
// Mail
$transport = Swift_MailTransport::newInstance();

// Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);

// Create the message
$the_message = Swift_Message::newInstance()

// Give the message a subject
->setSubject($subject)

// Set the From address with an associative array
->setFrom($_POST['email'])

// Set the To addresses with an associative array
->setTo(array($to))

->setEncoder(Swift_Encoding::get8BitEncoding())

// Give it a body
->setBody($message, 'text/plain', 'us-ascii');

//Check is BCC Field is emtpy. 
if ( !empty($bcc) ) 
{   //The BCC Field is not empty so set it.  
    $the_message->setBcc(explode(',', $bcc));
}

// Send the message
$result = $mailer->send($the_message); 
    }
    header("location:index.php?s=1");
?>

Here is an example of what the company is saying they are receiving:

Domestic Quote Request  Full Name: Test  Email: someone@somewhere.com  Phone: 555-555-5555     Pickup Date: 07/02/2012  Pickup City or Zip: 12938  Drop Off City or Zip: 23981  Year: 2009  Make: Audi  Model: A4  Carrier Type: enclosed carrier  This Quote is from awebsite.com 

And this is what I receive when I email myself.

Domestic Quote Request
Full Name: Test
Email: someone@somewhere.com
Phone: 555-555-5555
Pickup Date: 07/02/2012
Pickup City or Zip: 12938
Drop Off City or Zip: 23981
Year: 2009
Make: Audi
Model: M4
Carrier Type: enclosed carrier
This Quote is from awebsite.com

The company said that they believed that the lead was being sent as free text instead of plain text. Is there such a thing? I have never heard of free text.

Thank you in advance for the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:57:56+00:00Added an answer on June 8, 2026 at 12:57 am

    The only thing I can think of is that the web client they are viewing the email in parses emails in HTML. So instead of \n try <br /> maybe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send emails from smtps (secure smtp) using Indy and the
i found a way to send plain text email using intent: final Intent emailIntent
I am trying to print a table inside an e-mail using plain text. I
I'm trying to send plain text error messages from a tomcat servlet, so that
Rails 3 defaults to Content-Type: text/plain I'm trying to send and HTML email. How
I am trying to send email programmatically... I have this line of code: _mail.AddAttachmentData(nsd,text/plain,
I'm trying to send a simple plain-text email through my VB.net web application. I've
I am trying to send an email with a plain text body and an
I am trying to send a Rich Text Format email message using Outlook 2003.
am trying send an array to php file using $_POST ,still always getting an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.