Extract domain from email addressby Andy PrevostPosted to General on Tuesday July 8 2025 at 9:20 pm

It's not as easy as it seems.

If you take a look at all of the allowable characters for the local part of an email address, the commercial at sign (@) is one of them. That means that an email address like:

first@last@example.com 

is a valid email address. If you do the standard explode, you'll get three parts, not two. A typical function would  […more]

Categories:General  • Mail Transport  • Blog  • 
1 Comment

Email address inputby Andy PrevostPosted to General on Tuesday July 8 2025 at 7:43 am

When I initially wrote the new PHPMailer Pro, the goal was to make it as user friendly as possible. Looking through support requests, many of the new features included detection of the mail server, port, and protocol. 

Much of the challenge was around user input of email addresses. Much of the issues were based on:

  • input name first email address second, or is it email  […more]
Categories:General  • Mail Transport  • Blog  • 

Handling email addressesby Andy PrevostPosted to General on Thursday June 26 2025 at 11:39 am

I am in process of writing a new email address handling module for a new project that will eventually end up in PHPMailer Pro.

The process is underway with a good portion of the code written and testing underway. Just as this is ongoing, I received an email questioning a previous article about email address security. You can read two articles I wrote about security at […more]

Categories:General  • Mail Transport  • 

Adding email addressesby Andy PrevostPosted to General on Sunday June 22 2025 at 8:01 pm

One aspect of sending emails to a small or large email list is passing the email addresses to the mail transport, like PHPMailer Pro.

PHPMailer Pro handles it nicely with the ability to take email addresses in any of four formats:

  • Strings, with the option of multiple email addresses separated by a comma
  • Indexed Arrays, with the array key as a  […more]
Categories:General  • Mail Transport  • Blog  • 

PHPMailer-FVE on the way!by Andy PrevostPosted to General on Wednesday August 28 2024 at 6:17 pm

PHPMailer-FVE is nearly here. The code is actually complete, we're just building a few sample forms and doing more testing along the way.

What is it? What is PHPMailer-FVE? All these acronyms ... FVE meansFormValidate andEmail. It combines two other of my projects (FormValidator and PHPMailer-FE - or Form2Mail).

It's actually ready […more]

Categories:General  • Mail Transport  • 
Keywords: Form Validation, Form Transport, Form to Email

Follow up Form Validationby Andy PrevostPosted to General on Monday March 4 2024 at 12:25 am

On February 26, I wrote an article that included answering a question from a user. 

The question was about merging Form Validator and PHPMailer-FE. 

I use Form Validator extensively. Every form ever implemented by me (individually) or my company used Form Validator. 

It's 2024 and collecting information from your website users is even more risky today than ever. […more]

Categories:Mail Transport
Keywords: Form validation, email, marketing, testing, html

Form Validator ... what's needed?by Andy PrevostPosted to General on Monday February 26 2024 at 2:33 pm

Form Validator came about quite some time back. It is the result of my company's need for highly secure forms. At the time, we used javascript for browser based security, JQuery form mask for guiding and formatting user input (and in some cases, restricting). Form Validator was a server-based security strategy that was extremely effective.

Since then, we have switched to HTML5 for the  […more]

Categories:General  • Mail Transport  • 

Securityby Andy PrevostPosted to General on Monday February 19 2024 at 12:43 pm

Emails are a target for hackers. The single largest target is forms.

So many website process their user submitted forms with simple PHP code that uses PHP's Mail() function to get the data to their inbox.

I'll join all the other email transport developers in making it as clear as possible: PHP Mail() is seriously flawed and extremely difficult to work with. It's not that complex,  […more]

Categories:General  • Mail Transport  • 

Dumb Support: Got to stop sending files ...by Andy PrevostPosted to General on Sunday February 18 2024 at 1:02 pm

On two recent separate occasions, I have sent out files to fix issues.

It was well-meaning, trying to get a quick fix to a reasonably small issue.

I've been writing code and providing support for nearly 40 years. I know better ... you can't interrupt the development flow to send out a quick one-off of a software. There are so many problems with this  […more]

Categories:General  • Mail Transport  • 

New feature: undisclosed-recipientsby Andy PrevostPosted to General on Saturday February 17 2024 at 7:42 am

Another feature request that users have asked for over the years is the ability to send emails with "undisclosed-recipients:" showing in the To: field.

They want to put their distribution list in the Bcc field with an empty To field to minimize the load on the server. Sending individual emails means the server has to loop through and send each email individually ... that can  […more]

Keywords: "undisclosed-recipients"