PHP Mail

ScotWatson

New Member
Messages
18
Reaction score
0
Points
1
I have started experimenting with PHP mail command. I tested it against https://www.mail-tester.com/ to verify that it is sending. Although the message gets sent, mail-tester tell me that per the Sender Policy Framework, my server does not allow the sending server to use the email address. It quotes this as the SPF:
v=spf1 a mx ip4:198.91.81.11 ~all
Unfortunately, I am not familiar with SPF records, so I cannot interpret it easily. 198.91.81.11 is the IP address of x11.x10hosting.com. The email address I am using it the one that came by default when I signed up for the account. Are there limitations on what can be done with this email account? I see I can have up to 3 email accounts. If I create additional ones, would they have the same restrictions? How would I instruct the PHP mail command as to which email address to use?
I have enabled DKIM, but mail-tester also recommends adding a DMARC record, but I do not see how to do that. Is it possible?
 

mrburnsx

Community Advocate
Community Support
Messages
562
Reaction score
59
Points
28
Please also add ip4:198.91.80.251 to your SPF record. This is an edge server that all mail goes through.

To Add DMARC Record

Account Manager > DNS Management > Add Record

Type: TXT

TXT Record Type: DMARC

It will walk you through the process from there.
 

ScotWatson

New Member
Messages
18
Reaction score
0
Points
1
Thanks for the reply. It is working now!

I added a second email account. It does not let me suspend, unsuspend, delete, or rename the default email, even though I can on the second account. I also cannot log in to the default email account with Roundcube, as I cannot find or reset the password. It appears the default account is special.
Is it possible to use email addresses other than the default one with the PHP mail command?
Is it possible to have the server run a script in response to receiving an email?
 

mrburnsx

Community Advocate
Community Support
Messages
562
Reaction score
59
Points
28
1. The default account itself is special.
2. You can by the headers and define a different send from address, quite frankly I’d recommend using an actual mailer library like PHPMailer, this way SMTP can be used to authentic.
3. Not on free hosting, beyond a cron job that can only be done a max once every 5 minutes.
 
Top