I have read the docs and I as am new to this and maybe a
bit dumb, I could not really follow how to send the email out.
From the docs I have got this far:
Code: Select all
/*
* b_email_act.php
*
*
* send WAITING CONFIRMATION email
*/
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("localhost"));
//Create the message
$message =& new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
if ($swift->send(
$message, new Swift_Address("recipient@address.tld", "Recipient Name"),
new Swift_Address("sender@address.tld", "My Name")){
echo "Sent to $sent recipients";
}
else{
echo "Failed";
} // end else
But what I don't get is how my message fits in
I need to send a confirmation email - so it has to contain a link:
So this is my message:
Code: Select all
<html>
<head>
<title>Yodbod.com the Free Ads site</title>
</head>
<body>
<div style = '
width:600px;
background-color:white;
font-family:Tahoma, Tunga, sans-serif;
font-size:14;
text-align:left;
font-weight:normal;
padding:1px;
margin:1px;
'>
<p>
<br>
<center><b>Waiting for confirmation on your first advert.</b></center>
<br><br>
Dear $N_contact,
<br><br>
For your security we require that you confirm the advertisement placement by clicking on the
link below. By confirming your advertisement you also confirm your agreement to the terms of use
as set out in the terms.php document.
<br><br>
Please activate your advertisement NOW.<br><br>
ACTIVATE: <a href=\"http://www.yodbod.com/activate.php?client=$N_email\">Activate my Advert.</a>
<br><br>
Your email and password are recorderd as follows:<br>
Email: $N_email <br>
Password : $N_pass<br>
<br>
Thanks.<br>
</p>
</div>
</body>
</html>
";Would appreciate any help.
Thanks