Brinkster Knowledge Base
Supported Email Components - Linux Hosting
The samples below show how to send email from a Brinkster hosted web site through the supported email components.
Special Note
Be sure to make the following changes when using these coding examples:
1. Replace servername with the server name your site is hosted on.
2. Replace username with your Brinkster account username.
3. Replace YourDomain.com with a valid Brinkster hosted domain name.
4. Replace you@domain.com with a valid Brinkster hosted email account.
5. Replace password with the password for the email account used above.
6. Replace user@domain.com with a valid email account.
**Your FROM address must be the same as the email address you authenticate with.**
PHPMailer: <?PHP require("/sites/servername/username/home/includes/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "mymail.brinkster.com"; $mail->SMTPAuth = true; $mail->Username = "you@domain.com"; $mail->Password = "password"; $mail->From = "you@domain.com"; $mail->FromName = "Your Name"; $mail->AddAddress("user@domain.com", "Display Name"); $mail->IsHTML(true); $mail->Subject = "Test message sent using the PHPMailer component"; $mail->Body = "This is a test message."; if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent"; ?> |