Project:Basic webmail
Version:5.x-1.1
Component:Code
Category:task
Priority:normal
Assigned:oadaeh
Status:active

Issue Summary

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.

Comments

#1

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

#2

Category:bug report» task

I don't remember why I did it that way, but I certainly had my reasons. I'll see if I can come up with some mechanism that allows for all possible options.

#3

Assigned to:Anonymous» oadaeh

Assigning to self.