Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Emailing issues - Help!!! September 16, 2011 04:09PM |
Registered: 14 years ago Posts: 170 Rating: 0 |
Language: PHP<html> <head> <title>Mail Sent!</title> </head> <body> <?php $to = $_POST["to"]; $from = $_POST["from"]; $subject = $_POST["subject"]; $message = $_POST["message"]; $headers = "From: " . $from . "\r\n"; $mailsent = mail($to, $subject, $message, $headers); if ($mailsent) { echo "Congrats! The following message has been sent: <br><br>"; echo "<b>To:</b> $to<br>"; echo "<b>From:</b> $from<br>"; echo "<b>Subject:</b> $subject<br>"; echo "<b>Message:</b><br>"; echo $message; } else { echo "There was an error..."; } ?> </body> </html>
Language: PHP<html> <head> <title>Enter E-mail Data</title> </head> <body> <form name="theform" method="post" action="sendmail.php"> <table border ="1"> <tr> <td>To:</td> <td><input type="text" name="to" size="70"></td> </tr> <tr> <td>From:</td> <td><input type="text" name="from" size="70"></td> </tr> <tr> <td>Subject:</td> <td><input type="text" name="subject" size="70"></td> </tr> <tr> <td valign="top">Message:</td> <td><textarea cols="60" rows="10" name="message">Enter your message here</textarea> </td> </tr> <tr> <td></td> <td><input type="submit" value="Send"> <input type="reset" value="Reset the form"> </td> </tr> </table> </form> </body> </html>
Re: Emailing issues - Help!!! September 16, 2011 04:13PM |
Registered: 14 years ago Posts: 170 Rating: 0 |
Re: Emailing issues - Help!!! September 19, 2011 06:52AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Emailing issues - Help!!! September 19, 2011 12:31PM |
Registered: 12 years ago Posts: 175 Rating: 0 |
Re: Emailing issues - Help!!! September 19, 2011 02:28PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHPif (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); }
Re: Emailing issues - Help!!! September 20, 2011 04:58PM |
Registered: 14 years ago Posts: 170 Rating: 0 |
Emailing issues - Help!!! October 05, 2011 07:52PM |
Registered: 13 years ago Posts: 159 Rating: 0 |
Re: Emailing issues - Help!!! October 06, 2011 08:23AM |
Registered: 12 years ago Posts: 175 Rating: 0 |
Language: PHP<?php $to_email = "to@domain.co.za"; $from_email = "from@domain.co.za"; $message = "Test Email"; if (mail($to_email , "Email Subject", $message, "From: $from_email")) { echo("<p>Email successfully sent !</p>"); } else { echo("<p>Email delivery failed...</p>"); } ?>
Re: Emailing issues - Help!!! October 06, 2011 10:27AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Emailing issues - Help!!! October 06, 2011 07:45PM |
Registered: 13 years ago Posts: 186 Rating: 0 |
Re: Emailing issues - Help!!! October 07, 2011 07:36AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Emailing issues - Help!!! October 07, 2011 03:35PM |
Registered: 13 years ago Posts: 186 Rating: 0 |
Emailing issues - Help!!! October 08, 2011 10:51PM |
Registered: 13 years ago Posts: 159 Rating: 0 |
Re: Emailing issues - Help!!! October 23, 2011 10:13PM |
Registered: 12 years ago Posts: 27 Rating: 0 |
Language: PHP$headers = ';MIME-Version: 1.0';."\r\n"; $headers .= ';Content-type: text/html; charset=iso-8859-1';."\r\n"; $headers .= ';From: thinuss@tmsnyman.x10.mx';."\r\n"; if(mail("thinuss@gmail.com","PHPtest","test body",$headers)){ }
Re: Emailing issues - Help!!! October 24, 2011 08:08AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Emailing issues - Help!!! October 27, 2011 10:06PM |
Registered: 12 years ago Posts: 16 Rating: 0 |