SMTP login

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
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

SMTP login

Post by pinehead18 »

How on earth can i not find the area to set the smtp username and pass?

Help for the tired, extremely tired noob.

Thanks
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It's the bold section called "SMTP Authentication" in the Connections section of the wiki:

http://www.swiftmailer.org/wikidocs/v3/smtpauth

It's as simple as:

Code: Select all

$smtp =& new Swift_Connection_SMTP("...");
$smtp->setUsername(" ... ");
$smtp->setPassword(" ... ");

$swift =& new Swift($smtp);
jcbodyworks
Forum Newbie
Posts: 2
Joined: Wed Sep 05, 2007 1:29 am

where

Post by jcbodyworks »

now unto which file do I paste this code and where within that file?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: where

Post by Chris Corbyn »

jcbodyworks wrote:now unto which file do I paste this code and where within that file?
What code do you have so far? You don't have to modify any of the Swift files so you'll just need to modify whatever you have so far. Where you call "new Swift", just replace that with those lines of code ammended to fit your needs. If you have any trouble just post your code.
Post Reply