Hi,
I am building a kind of yellow pages module, and I need interaction via email, and just noticed this issue:
When WB sends email to user (who is loged in), he gets email and in From email WB use current username of loged user.
So if I fill in form as Ivan, I get email as Ivan <
no-replay@my-test-site.xy> and If Marko fills in the form, he will get email from Marko <
no-replay@my-test-site.xy>
So it doesnt make sence to me that WB user use session username as sender, especialy when module interacts with loged users, when he can use Default Sender Name from Settigns..
What do you think ?
This is code for From Name in email (class.wbmailer.php)
// set default sender name
if($this->FromName == 'Root User') {
if(isset($_SESSION['DISPLAY_NAME'])) {
$this->FromName = $_SESSION['DISPLAY_NAME']; // FROM NAME: display name of user logged in
} else {
$this->FromName = $db_wbmailer_default_sendername; // FROM NAME: set default name
}
}
Also, I am curious, in this code:
$wb->mail(SERVER_EMAIL,$admin_email,$mail_subject,$mail_message)
How to add cc and bcc fields?
if
$admin_email = no-replay@my-test-site.xy
is there a way to that I can specify the senders name in $admin_email like:
$admin_email = ThisName no-replay@my-test-site.xy
??
cheers