I cant seem to understand what to do. i have uploaded swiftmailer to my domain... but what doi do to start sending emails?
what page do i visit?
help !!!!!!!!!!!!!!!!!
i need TOTAL HELP !!!
Moderators: Chris Corbyn, General Moderators
Re: i need TOTAL HELP !!!
You have to read the documentation and you ll understand what you can do.
http://swiftmailer.org/wikidocs/
Anyways some simple code how you can use it.
Your message sounds like you were expecting something like phpmynewsletter script where you have an admin panel ... there is no such thing with swiftmailer....you have to build that.
http://swiftmailer.org/wikidocs/
Anyways some simple code how you can use it.
Code: Select all
//check with your host what your smtp server is (if using smtp)
$smtp =& new Swift_Connection_SMTP("smtp.myhost.com");
$smtp->setUsername("myusername");
$smtp->setpassword("mypassword);
$swift = new Swift($smtp);
$message =& new Swift_Message("My subject", "My body");
//recipients list
$recipients = new Swift_RecipientList();
$recipients->addTo("email1@somewhere.com]);
$recipients->addTo("email2@somewhere.com]); //and you can go on adding
if ( $swift->batchSend($message, $recipients, "myadress@somewhere.com", "my name") )
{
$swift->disconnect();
header("location: newsletter.php?msg=sentsuccess");
}
else
{
$swift->disconnect();
header("location: newsletter.php?msg=sentfail");
}bug24 wrote:I cant seem to understand what to do. i have uploaded swiftmailer to my domain... but what doi do to start sending emails?
what page do i visit?
help !!!!!!!!!!!!!!!!!
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: i need TOTAL HELP !!!
Indeed, Swift is a library (i.e. "glue code") as opposed to an application. It makes it easy to build such an application, but doesn't tie you to any specific implementation.