Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Added a function smtp_validate_addresses($fromAddress = FALSE, $toAddresses = array()) to validate mail addresses via stmp RCPT TO:<$toADDRESS>
Some mail addresses are not accepted by smtp, so if sometimes we need to validate them before really send mails.
Comment | File | Size | Author |
---|---|---|---|
#6 | smtp-n2141753-5.patch | 3.19 KB | jordanpagewhite |
| |||
#4 | smtp-n2141753-4.patch | 3.19 KB | DamienMcKenna |
|
Comments
Comment #1
rogical CreditAttribution: rogical commentedInstead of throwing an scare exception, just return the error directly.
Comment #2
rogical CreditAttribution: rogical commentedComment #3
mgiffordThis still applies nicely (one year after you submitted it).
How do we test this patch? I don't presently need this functionality myself, but can see how it could be useful.
Comment #4
DamienMcKennaRerolled, and I removed the unnecessary changes from PHPMailer->SmtpConnect().
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer and commentedLooks good to me. I rolled the patch and it applied perfect. Seems legit to me. Let me know if you want to to test this one further. I am going to work on another one on the list.
Comment #6
jordanpagewhite CreditAttribution: jordanpagewhite as a volunteer commentedLooks good. I think I caught two typos. Check the interdiff.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer and commentedI see your two typos and raise you one typo.
- return t('The from mail address: !fromAddress is not accpted by the SMTP server.', array('!fromAddress' => $fromAddress));
to
- return t('The from mail address: !fromAddress is not accepted by the SMTP server.', array('!fromAddress' => $fromAddress));
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer and commentedComment #9
jordanpagewhite CreditAttribution: jordanpagewhite as a volunteer commented@alex_drupal_dev Hmm. The only difference that I can see between my interdiff and your interdiff is that yours has the correct spelling of "accepted" in the "-" line of the second edit. Did you generate this yourself or did you just edit my interdiff? If you generated it, I think we were working from different versions of the module. If you just edited my interdiff, you can read how to generate an interdiff here https://www.drupal.org/documentation/git/interdiff
Comment #10
DamienMcKennaThe interdiff in #7 is redundant and can be ignored. +1 for the patch in #6.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer and commentedLOL. Just an edit for the typo. Thanks for the link I will definitely use it. :) Just keeping things fun :) I appreciate the link I will practice creating some later tonight :)
Comment #12
wundo CreditAttribution: wundo at Chuva Inc. commentedClosing very old (dead) issues, if you think this is still relevant please re-open.