Just tested this on my test site and also did not work. Not sure why yet, but im checking into it.
Hopefully a team member has some more information on this :)
Also wanted to add that it is using the correct php method and it should work from what i see so far. Could be an individual hosting issue, i know some hosts do some strange stuff and have some very funky settings at times. Like my host, they wont let me set the cron to run every minute because they say it uses too many resources so to keep the server flow at a higher rate they restrict it to 1x per hour. If some work and some dont that points to a possible server issue.
Also it was originally set to use the Queue for he cron but i am testing using direct send because the cron process did not send either. Which again points to a server issue.
Here is a quote from my host.
The script appears to be using PHP mail() at the moment. According to the logs, it is currently trying to use an email account associated with a personal email account outside of the domain name in the "From" header. We have a rule enabled on our shared hosting servers that makes sure the header From for the outgoing email actually exists on the server. This is done for security, IP reputation maintenance, and anti-spam reasons. In such cases, to resolve the issue we recommend using an actually existing mailbox (the one that exists in your cPanel, that is) in header "From" to send emails, and if you need to keep the visitors email you just add another header - "Reply-To". Changing your current script's configuration this way should work well for you.
So i change the php values and it works...
here is my change...
edit ow_plugins/contactus/controllers/contact.php
and change the following values..
original code...
$mail->setSender($data['from']);
change to
$mail->setSender($contactEmails[$data['to']]['email']);
This will make the contact form send it from you to you using the server email, remember you must use an email inside your server such as customerservice@yoursite.com
Now since you may need the email of the person sending you the email, make the following code addition
original code
does not exist you need to add this on the next line after the setSender code
new code
$mail->setReplyTo($data['from']);
now you will have their email, you may have to check the header of the email to get it at times but that is how it is.
and now your contactus plugin will work.
Hope this helps.
Dave :)
ps... remember that it is set to send them when your cron runs, not right away...
well it does send but unfortunately the reply to email is not being placed in the email header for some reason.
Received: from [xxx.xxx.xxx.xxx] (port=xxxxxx helo=www.xxxxxx.com)by xxxxxxxxhosting.com with esmtpsa (TLSv1.2:DHE-RSA-xxxxxx-GCM-SHAxxxxxx:256)(Exim 4.86_1)(envelope-from <xxxx@xxxxxxxx.com>)id 1xxxxxx-0031Mp-xxfor xxxxxx@xxxxxxxx.com; Sat, 30 Apr 2016 19:58:08 -0400Date: Sat, 30 Apr 2016 17:58:07 -0600To: xxxx@xxxxxxxx.comFrom: xxxx@xxxxxxxx.comSubject: does this workMessage-ID: <f40680a710c95825dcxxxxxxxxxxx@www.xxxxxxx.com>X-Mailer: PHPMailer 5.2.14 (https://github.com/PHPMailer/PHPMailer)MIME-Version: 1.0Content-Type: text/plain; charset=utf-8Content-Transfer-Encoding: 8bit
does this work check header
so i assume they either have that field turned off in the php mailer or some other core issue with it as it should be passed to the email header unless something has not been set or has been removed from the php mailer core process.
But i believe what happens is that in the competitive bid to get your business some companies along with reduced prices, also trim the fat on server options to keep the servers from lagging.
But just so you know in my testing also managed to get one sent to an outside email address however even with hotmail's expended header detail the reply to address was still not listed. So i checked the mail code and it seems OK, the reply to is there and should work. So right now i am not sure what the issue is and why the reply to is not showing up in the header detail.
Bottom line is with this rule they have about the from email being internal only, the only way to get around it is to recode the contactus plugin to use SMTP and not php mail().
At least that is the last word as we speak. So yes the email will work now with my changes but you will not know who to contact because that data is not there.
So if you want to use external email address in the contactus plugin and your server host has this special rule mentioned above, then the contactus plugin needs to have an option for smtp mail and also your host might need to open up a special smtp port for you.
Sorry i wish i had better news.
I could do more research to find out what code changes to do if necessary however i need to get my plugin done and i wanted to have it done this weekend if possible. So i need to focus back on that for now, sorry.. Besides i wanted to wait for a team member reply in case they already have a plan of action on this one.
Since your cron does not run that often you might think about changing the 'addToQueue' in the file i edited to 'send', it will send right away.
as to the character set deal, i have no clue, sorry :(
ps.. please explain what you changed again, was it in the run.php file?
nice -n19 ionice -c2 -n7 /usr/local/bin/php -f /home/{yoursite}/public_html/ow_cron/run.php