SMTPDebug = 0;
$mail->isSMTP();
$mail->Mailer = “smtp”;
$mail->Host = “mail.izwi98fm.co.za”;
$mail->SMTPAuth = true;
/*I created a new email address (1lifecampaign@izwi98fm.co.za) specifically for sending entries to Izwi. The emails are sent from this email address to info@izwi98fm.co.za. If you want to use different email addresses to send or receive the data, you can change the details below accordingly. */
$mail->Username = “1lifecampaign@izwi98fm.co.za”;
$mail->Password = “X]%KMK3[vtB8”;
$mail->SMTPSecure = “tls”;
$mail->Port = 587;
$mail->setFrom(‘1lifecampaign@izwi98fm.co.za’, ‘Izwi 1Life Campaign’);
$mail->addAddress(“info@izwi98fm.co.za”); //recipient email address.
//The email message.
$mail->Subject = “Entry from 1Life Competition”;
$mail->Body = “Name: “.$igama.”\nPhone number: “.$ifoni.”\nEmail address: “.$i_email.”\nQuotation: “.$response;
$mail->send();
/*The following piece of code makes the 1Life API call only if the user checked the radio button. When testing this script, e.g. if kuwukuthi wuwe ozosiza ezinye iziteshi njengoba ngizwe sengathi kunento ekanjalo, remember to replace $Full_API_URL below with $testURL ukuze i-data ingayi ku-1Life bacabange ukuthi yi-entry entsha kanti you are just testing. If all is working well, you should receive i-email kwi-recipient address oyifakile, and then you should be redirected to google.co.za or another test url that you used.*/
if($response == “Send_quotation”) {?>