Product Information - About our software

Sending email with DWmail (behind the scenes)

How does DWmail send email?

DWmail uses the PHP mail() function to send email. Once PHP issues a mail() command to PHP, PHP then sends this to your mail software such as sendmail, qmail etc. PHP will then report mail as successful regardless of what happens next.

This can therefore produce some false positives especially if the email software fails to connect the the destination mail server, the destination mail server rejects the message or SMTP authentication is enabled.

Why not use SMTP instead?

We have been considering for some time adding an SMTP engine into DWmail however there are some problems with such a process. There are various methods we are investigating for using SMTP

  1. We can connect to the SMTP server for the FROM address. However if the email account is a an ISP email account we may get a relaying denied message. ISPs often put restrictions in place preventing third parties from injecting mail to their servers unless you are connected with one of their own IP addresses

  2. We can connect connect using localhost as an SMTP server. We may get a denied message if using a remote email address as the checking account (i.e. not one currently hosted by your web server) and the server has POP3 before SMTP or a closed relay we will be denied access to send email.

  3. If we initiate an SMTP connection to the destination address. We would have to perform an MX lookup for each email address in the to, cc and bcc fields and connect to each one individually. The advantage is that this will almost certainly work in most circumstances but will be the slowest by a long way.
So what do we do?

Firstly if you are considering purchasing DWmail ensure that the mail() function works correctly. If it doesn't you will most likely find that DWmail reports email sent but doesn't actually send it. Simple initate a simple mail() command.

It should be noted that the majority of web hosting configurations will have NO issue with DWmail.

However we need make people aware of possible problems so we currently investigating developing a 'local' mode configuration for DWmail where you can lock the webmail functionality to local email accounts only. The default would always be 'remote' mode (which allows you to access any of your pop3 or imap4 addresses on the Internet).

How has DWmail changed to take into account SMTP?

When deciding on our plans for DWmail we investigated developing DWmail in the following modes.

'Remote' mode (default) will continue to use PHP's mail() function and thus requires that the mail() function can send email through your web server.

'Local' mode will by default use PHP's mail() function but will have the option of switching to SMTP mode as described in point 2 above. We will connect to the localhost as an SMTP server as this will work regardless of closed or pop3 before SMTP relays as the email will always be local to that server but can only send FROM email addresses currently hosted on that server.

What did we do?

We developed the proposed local mode which allows connections to a single mail server. This also had an optional SMTP implementation which could also be used with SMTP authentication.

If you can send email via PHP mail() or if DWmail currently works on your server to send emails then these changes will not affect you in anyway






Copyright 1997-2009 Dominion Web All rights reserved. Privacy Policy.
Customer Support Area, Forums and Community Public and Customer Download Area DW:Design - Dominion Web DesignSoftware and Applications for the iPhone and iPod Touch Windows Applications and .NET Developer Components Dominion Web - Just imagine the possibilities Web Server Applications and Scripts