When attempting to send "Send to a Friend" everything works well until you "send". It errors out with this message -

    * The submitted from address (username <site-admin@mysite.com>) is not valid.
    * Unable to send e-mail. Please contact the site admin, if the problem persists.

The particulars are
Drupal 6.4
SMTP Auth Module
Port 25 Blocked

I've tested outbound mailing with other modules like "Friend" and what not with no problems. This problem is specific to this module only.

I've "un-installed" and then activated the module again with no luck.

Comments

jcnventura’s picture

Title: Error Sending Page » username <user@example.com> not supported properly
Project: Printer, email and PDF versions » SMTP Authentication Support
Version: 6.x-1.0-rc9 » 6.x-1.x-dev

Hi,

After reviewing SMTP auth's code, I have concluded that it is not fully compliant with RFC 822 (and possibly others), as it expects that the User's name must be enclosed in quotes. This is not necessary, and it's what causing the problem with the print module.

I am moving the issue to the STMP auth's module issue queue.

João

oadaeh’s picture

Assigned: Unassigned » oadaeh

This is an FYI for all concerned parties. (This message is duplicated on the issues listed below. Read on for the why.)

I don't actually like the way the From e-mail address is handled in the code for the SMTP Authentication Support module. I have plans to change it, but because I think it will be a bit of a paradigm shift to change it so it works better and makes more sense, I was kind of waiting for my last massive changes is settle in a bit to see if they were causing anyone any problems before I potentially created more problems.

Although all the relevant issues are all pretty much duplicates of each other, there are some nuances in each that I want to capture in my work through the code. These are the relevant issues that I'll be working on together:
http://drupal.org/node/200415
http://drupal.org/node/279836
http://drupal.org/node/295655
http://drupal.org/node/300055

Just know that I will be working on these in the next month or so (sooner, if I get my current task list cleared up).

BTW, I'll be making the changes first in the 6.x branch. Once everything is settled, I'll backport them to the 5.x branch.

akalata’s picture

horuskol’s picture

I had a problem where the module was truncating a three word name - I found the cause to be in line 341 of the smtp.module file. The regex was matching upto either a double quote or the first space character. I changed the line to:

$from_name = preg_replace('/"?([^("\<)]*)"?.*$/', '$1', $from); // This now produces: Firstname Lastname

I'm afraid I don't have time to make a patch for you - bit of a rush on. Will try and push something out when things are quieter again.

wundo’s picture

Issue summary: View changes
Status: Needs work » Closed (works as designed)

Closing very old (dead) issues, if you think this is still relevant please re-open.