Closed (fixed)
Project:
Mime Mail
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2011 at 23:56 UTC
Updated:
10 Sep 2011 at 20:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
sgabe commentedIf the sender e-mail address is not set the message will be sent with the site's mail address.
Comment #2
oadaeh commentedNo, actually, it will not. What it does is gets the variables 'mimemail_name' and 'mimemail_mail', and if they don't exist (not, if they are empty), uses $site_name and $site_mail, instead. The problem is that when the configuration page is saved and those fields are blank, the variables get saved as ''. So when the check is made, the variables exist but are empty, so
$fromgets set toarray('name' => '', 'mail' => ''), notarray('name' => $site_name , 'mail' => $site_mail). The attached patch should fix the problem.Comment #3
sgabe commentedSorry, you are right, though your patch kills the feature to specify the sender's name and address.
Comment #4
oadaeh commentedSorry about that. For some reason, I was under the impression that $from was already being set to 'mimemail_mail' before it got to that point (thus, adding to my confusion). Upon reviewing the code, I see that assumption was totally unfounded.
I do believe, however, in the interest of unnecessarily using memory or CPU resources (however small that may be), the creation and assignment of the $mimemail_name and $mimemail_mail variables should be within the scope they are used.
Comment #5
sgabe commentedFair enough. Committed on both branches, thanks!