Web Hosting - SMTP PHP Relay

By default the Campus SMTP Relay service (https://kb.wisc.edu/14051) for programmatic sending without authentication is already registered for Shared Hosting servers and subnets.

By default, php's mail() function calls the mail program (either sendmail or qmail), and directly opens the network connection to the destination mail server. Sending email this way may not give you robust sender verification that services like Gmail have begun to start to require. (More details here: https://it.wisc.edu/it-community/email-authenticity)

In order to get PHP to use the campus smtp relay, two things need to occur:

1.) The PHP code needs to be able to send with SMTP. If you are using something like Wordpress, there are SMTP plugins available, also here are some examples for using PHP to send with the SMTP relay:

A.) https://blog.mailtrap.io/php-email-sending/
B.) https://help.dreamhost.com/hc/en-us/articles/216140597-How-do-I-send-PHP-mail-via-SMTP-
C.) https://stackoverflow.com/questions/3525818/smtp-configuration-for-php-mail

2.) Use this SMTP configuration (more details here: https://kb.wisc.edu/29362):

SMTP Server: smtp.wiscmail.wisc.edu
SMTP Port: 25
ID/Password: This is not used. Please leave blank.
TLS/SSL: Enabled (where possible)

Depending on which Shared Hosting platform you are on, we may need to install a few PECL/pear packages to enable the functionality you desire.

If you need assistance, please let us know if you: 1.  Receive a specific error when trying to send the message, AND 2.  A way to reproduce the problem, so we can get the correct packages installed for you and reach out via webhosting@doit.wisc.edu