Is this okay (in my email headers)

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Is this okay (in my email headers)

Post by seodevhead »

I've been having one heck of a problem getting my emails sent out from my server to not go into junk folders (eventhough I have SPF record passing and DNS correct).... I was looking at my headers for an email sent out by swift that show the following:

Return-path: <replaced@replaced.com>
Envelope-to: senthere@senthere.com
Delivery-date: Sat, 23 Feb 2008 14:46:02 -0500
Received: from [67.xxx.xxx.86] (port=36334)
by host.replaced.com with esmtpa (Exim 4.68)
(envelope-from <replaced@replaced.com>)
id 1JT0Ju-0006uN-Ex
for senthere@senthere.com; Sat, 23 Feb 2008 14:46:02 -0500
To: Persons Name <senthere@senthere.com>
From: replaced@replaced.com
Reply-To: replaced@replaced.com
Subject: Swift Headers Check
Date: Sat, 23 Feb 2008 14:46:02 -0500
X-LibVersion: 3.3.2
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="_=_swift-17604031947c077fa715e58.97912236_=_"
Content-Transfer-Encoding: 7bit
Message-ID: <20080223194602.6539.940519746.swift@www.replaced.com>

*note: I've replaced the emails/ip for privacy sake.

See the very bottom of those headers where it says boundary? Is all that supposed to be in my email headers? I didn't know so I thought I'd ask if anything looked wrong here.

Here is a snippet of how I am implementing swiftmailer in my php script:

Code: Select all

 
                        # Create the email for user:
                        # NOTE:  IF PHP5 => Take out the & in =&
                        $smtp = new Swift_Connection_SMTP("mail.replaced.com");
                        $smtp->setUsername("info+replaced.com");
                        $smtp->setPassword("password");
                        $swift = new Swift($smtp);
                        
                        //Create a message
                        $message =& new Swift_Message("Swift Headers");
                         
                        $textBody = 'The other day I went down to the pond and fed the ducks.  We threw bread a lot and sang carols with the other children.  It was a great time.\n\nKathy';
                        
                        $htmlBody = 'The other day I went down to the pond and fed the ducks.  We threw bread a lot and sang carols with the other children.  It was a great time.<br><br>Kathy';
                        
                        //Add some "parts"
                        $message->attach(new Swift_Message_Part("$textBody"));
                        $message->attach(new Swift_Message_Part("$htmlBody", "text/html"));
                         
                        $emailToSendTo = "senthere@senthere.com";
                        
                        //And send like usual
                        if ($swift->send($message, $emailToSendTo, "replaced@replaced.com"))
                            $confirmEmailSent = TRUE;
                        else
                            $confirmEmailSent = FALSE;
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Is this okay (in my email headers)

Post by Chris Corbyn »

Are you asking if the "boundary" should be there? It should indeed, this is part of the email structure ;) The headers look ok to me.
Post Reply