Wrong From address

laghalt - July 10, 2008 - 14:47
Project:Basic webmail
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The "Basic webmail account settings" require no sender adress but it uses another field as sender! I have the correct From adress in both the user e-mail and in the SMTP module (witch testmails are corect).
Instead it uses my "E-mail account login" as a part of the sender adress - for some it might work, but not for me as my ISP dont accept any username (but any mailadress).
The From field reults in useraccountname@mydomain.com instead, where it should be: sender@mydomain.com.

#1

laghalt - July 10, 2008 - 15:17

A simple solution is on lines 1456 in basic_webmail.module

  // Set the From e-mail address.
  if (variable_get('basic_webmail_account_info', 1)) {
//    $send_mail_from = $user->name .' <'. $user->mail .'>';
    $sent_envelope['from'] = $user->mail;
    $send_mail_from        = $user->mail;
  }
  else {
    $send_mail_from = $user->name .' <'. $user->basic_webmail_username .'>';
    $sent_envelope['from'] = $user->basic_webmail_username;
    $send_mail_from        = $user->basic_webmail_username;
  }

Just to remove the if.

  // Set the From e-mail address.
    $sent_envelope['from'] = $user->mail;
    $send_mail_from        = $user->mail;

That means that you need to give the correkt mailadress in the user settings. A better solution migt be a variable called somthing like $user->basic_webbmail_mailadress

 
 

Drupal is a registered trademark of Dries Buytaert.