swiftmailer also handles the headers: http://swiftmailer.org/docs/headers.html
i.e. it does fit your requirements-- if you don't want to use it that's fine, but i suggested it because it can probably allow you to do anything you might need to do. On Thu, May 24, 2012 at 7:09 PM, Steve Meyers <[email protected]>wrote: > Thanks, but I did see that. It does not fit my needs, since I have the > full headers already included in the message body. > > On 5/24/12 6:57 PM, [email protected] wrote: > >> /*This documentation covers the items below >> (creating an SMTP transport, then using it to send email)*/ >> http://swiftmailer.org/docs/**sending.html<http://swiftmailer.org/docs/sending.html> >> >> /*Instead of just sending you back to the docs, here's an example of a >> working swiftmailer method/function with SMTP: */*(i.e. you can just >> modify this to suit your needs)* >> >> >> //get swiftmailer library >> require_once '/swiftmailer/lib/swift_**required.php'; >> // Create the Transport >> $transport = Swift_SmtpTransport::**newInstance('xyz.com >> <http://xyz.com>', 465, 'ssl') >> ->setUsername('admin+somesite.**com <http://somesite.com> < >> http://somesite.com>') >> >> ->setPassword('yourPassword'); >> >> // Create the Mailer using your created Transport >> $mailer = Swift_Mailer::newInstance($**transport); >> // Create a message >> $message = Swift_Message::newInstance('**subject') >> ->setFrom(array('admin@**somesite.com <[email protected]> >> <mailto:[email protected]>' => 'Some Name')) >> >> ->setTo(array($data['email'] => $data['first_name'] . " " . >> $data['last_name'])) >> ->setBcc(array('admin@**anothersite.com<[email protected]> >> <mailto:[email protected]>**' => 'Some Name')) >> >> ->setSubject($data['subject']) >> ->setBody($data['message'], 'text/html') >> ->setReplyTo(array('admin@**somesite.com <[email protected]> >> <mailto:[email protected]>' => 'Some Name')); >> >> >> // Send the message >> $result = $mailer->send($message); >> >> -Jason >> >> On Thu, May 24, 2012 at 5:18 PM, Steve Meyers <[email protected] >> <mailto:steve-uphpu@spamwiz.**com <[email protected]>>> wrote: >> >> On 5/24/12 4:59 PM, [email protected] >> <mailto:jason.feriante@gmail.**com <[email protected]>> wrote: >> >> Generally speaking, I think most developers use swiftmailer >> these days. >> It's what I normally use to send email... (if I'm not inside of a >> framework using a helper method) >> http://swiftmailer.org/ >> It allows you to use SMTP of course... >> >> >> I looked at that, but it doesn't seem to support what I need. I >> have the message (including headers) all ready to go, and just need >> to send it out using an SMTP connection. I don't see a way for >> SwiftMailer to do that (from a cursory read of the docs). >> Otherwise, it looks like a great library. >> >> Steve >> >> >> > _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
