SarahS74
3 days ago

PHP Mail settings

Posted 3 days ago by SarahS74

I have a basic PHP contact form on one page. It doesn't do much and the basic send code is this:

mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $headers) or die ("Failure");

However, it has some problems sending to Gmail accounts (but others seem fine). My host says that I need to change the server, port, encryption and authentication but I have only ever seen that done in the php.ini, but I cannot edit that. Can I change these settings in my PHP code? Thanks.

Please sign in or create an account to participate in this conversation.