close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Advice Please - mail error....Sending To: ... mail() has been disabled for security reasons

Thread began 2/16/2015 12:19 pm by CraigR | Last modified 2/27/2015 11:21 am by Jason Byrnes | 3631 views | 7 replies |

CraigRBeta Tester

Advice Please - mail error....Sending To: ... mail() has been disabled for security reasons

I am just setting up a site, where an email is to be sent if a certain trigger is fired.

I set up the email as usual but nothing is being sent.

So i set up email logging and get the error as shown above.

I contact my hosting provider, as I thought this was strange, as I already have 5 or 6 sites hosted with them, and rely on this service for ecommerce sites created using ecart. - never had the problem before,

As it happens, they have been taken over recently, so I wondered if it was a coincidence.

Anyway after a few messages, I get the following response...

"The more we research this, the more it seems wisest to steer clear of PHP|Mail as cPanel is making it much more difficult to provide a stable environment for this feature, likely due to security concerns. Which is actually fine by me as we have seen a variety of outdated code be hijacked and exploited for this purpose over the past year.. I know this isn't supremely helpful news in the slightest. I know that any changes we make will be all-too-likely overridden by cPanel's update processes as Exim is patched up & adjusted, in future releases. We are now advising users to make use of strict SMTP-authentication plug-ins and applicable code snippets to replace the 'auto-authenticated' passthrough that certain older functions allow.

It's not a real life solution, I am well aware of that. That said, I honestly do think it's the wisest way forward considering the circumstances and please let us know if you have any questions about implementation, we're fully able to help you research this. "

I don't know what to make of this.

I also suspect my other sites may have stopped sending confirmation emails, though this is yet to be confirmed

Grateful for any advice.

Sign in to reply to this post

Jason ByrnesWebAssist

the PHP mail() function is a fairly insecure method of sending mail, and it sounds like your host is trying to move away from using it and suggesting you use more secure mailing methods, such as Pear Mail.

In Universal Email, on the SMTP server settings tab, you can select to use mail, or use Pear Mail using SMTP. Double check with the host that they have Pear Mail installed for your site and you can use that. Pears Mail offers more security.

Sign in to reply to this post

CraigRBeta Tester

Thanks Jason - not something I had noticed before.

I have managed to install and configure PEAR and SMTP on my site, and now have it working.

What I would now like to do is be able to test the same functionality, whilst working on my local test site, so I only need to update the $WA_MailObject Path to go live

I have installed PEAR, Mail and SMTP on my local testing server , and am logging my emails, however I get a send failure every time

My local settings are as below,

$WA_MailObject = WAUE_Definition("C:/Program Files (x86)/PHP/PEAR/","mail.localhost","25","","","false","","","","");

I am using vhosts in apache to give me a virtual domain name. but trying either this or localhost gives me an error

10001 - Failed to connect to mail.localhost:25 [SMTP: Failed to connect socket: php_network_getaddresses: getaddrinfo failed: No such host is known. (code: -1, response: )] - Failure <br>

i checked my php.ini and smtp is localhost and port is 25

(Running Apache on Windows 7 x64)

Sign in to reply to this post

Jason ByrnesWebAssist

this means the SMTP server is not configured to listen to the address:
mail.localhost

on port 25

What SMTP Server are you using? double check that it is properly configured.

For myself, i don't bother with setting up an SMTP server, i do my local testing through a remote SMTP server.

you may be able to use your hosts SMTP server, or i like to use my Gmail account

you can send through the gmail server by using the address:

ssl://smtp.gmail.com

on port 465

make sure to enable authentication, and use your gmail account details. you may get an email from google about a 3rd party application using your account and you will need to enable 3rd party applications..

Sign in to reply to this post

CraigRBeta Tester

Thanks Jason,

I couldn;t get the gmail option to work at first, this appears to be because I need to enable 'Access for less secure apps' - and get all of the appropriate security warnings.

It works with this option enabled, I'm guessing that is something I have to have set and there is no way around it ?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, this is what I meant when mentioning the email for google about 3rd part applications.

No, there is not a way around it.

Sign in to reply to this post

CraigRBeta Tester

Ok, its doing as it should.

Thanks for your help (ps I also got an email saying this thread had been replied to, which is the first notification in a while) ;-)

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Ray was doing some work on the notification emails yesterday, glad to hear it was coming through for you.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...