SALE. on all hosting.
Use promocode:
SPRING30
Login

How to use SMTP authentication within web scripts

Question)
How do I add SMTP Authentication in my scripts

Answer)

This is different for each type of mailing component, below is the code you need to add to your scripts.

ASPMail 4:
No longer supported, use ASPEmail 5, to change to ASPMail 5 from ASPMail, in your script do the following:

Find: Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Replace with: Set Mailer = Server.CreateObject("Persits.MailSender")

ASPEmail 5:
Find the line of code that contains the Mail Server Host address ie Mailer.Host = yourHost or yourHost = for example. then on the next line add:
Mail.Username = "your-email-address@domain.com"

Mail.Password = "Your-email-login-password"

This will fix the problem for ASPEmail 5.

JMail Pro 4.5:
Add the following code to your mailer script:
Message.MailServerUserName = "
your-email-address@domain.com"

Message.MailServerPassword = "Your-email-login-password"

This will fix the problem for Jmail.

CDOSYS:

For CDOSYS, this is a little bit more complex, see https://portal.cyberhostpro.com/knowledgebase/64/Example-CDOSYS-Script.html
for an example script including Authentication.

PHP:

PHPMail is not supported on Windows, however you can use a PHP SMTP script which will work, see https://portal.cyberhostpro.com/support/index.php?/Knowledgebase/Article/View/100/0/php-mail-script-with-smtp-authentication

For PHPMailer scripts try editing your script to add the SMTP options like below:

$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "mail.your-domain"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username =
you@your-domain; // SMTP username
$mail->Password = "POP3-Password"; // SMTP password
$mail->Port = 25;

Recent Posts
How to host our email with another provider

To host your email with another provider, you need to do the following: 1.  Login to your...

PHP Mail Script with SMTP Authentication (UPDATED)

You can find an example of how to use this script HEREAn SMTP Authentication sample script was...

What are the POP3/SMTP Settings for my Email Client?

Below is information in reference to email settings for mail clients such as Outlook, Outlook...

Wordpress Mail Form not working

Q: My wordpress mail/contact forms are not working on shared hosting?A: Our shared hosting...

PHP Mail script for sending SMTP Authenticated emails

Below is an example a customer sent us to replace phpmail with a email script that uses SMTP...