Bug or Feature? Emails sent as logged in user.

  • Philip S. Hempel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #66811 by Philip S. Hempel
Bug or Feature? Emails sent as logged in user. was created by Philip S. Hempel
I am doing some testing to verify service configurations are working.
I am having problems with mail being sent for the bookings, the server denies the delivery because the user is not allowed to send mail from the system it is coming from. This makes sense because the user sending the email is a gmail account and not the system user that I have configured in OSB.
So the mail gets bounced, and it looks like all three mailings that are being done are sent the same way, the email address of the business is being filled in with the logged in user's email address.
This is not what I would expect to see, but I am not sure if this is what was designed or not for this.

Thanks again, if I need to I will submit a bug report on this if this is not what should be happening.

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #66814 by Mr. Dam
Hi Phillip,
I am not sure with your problem? You mean the notification email can't be sent?
Dam

Please Log in or Create an account to join the conversation.

  • Philip S. Hempel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #66863 by Philip S. Hempel
Replied by Philip S. Hempel on topic Bug or Feature? Emails sent as logged in user.
es that is correct, because the server is checking that the sender of the mail server is allowed to send from the incoming server it denies it.
What is see is happening is that the users email is being filled in as the sender. This is where the email address from my company should be filled in. So the problem becomes twofold.
1. The mail server tries to send the email and mistakenly has been filled in with the email address of the user that is logged in.
It looks like this:
Code:
"My Company" <theloggedinuser@hisgmail.com>
Because of this it fails because the sending server says lets check the sender, is he allowed to send from that domain... hmm. no
hisgmail.com does not allow mail from that ip address.
2. The whole problem is that the email should be filled in with my company email as the send and it is not being done that way.
So something is pulling the wrong email out of the system configurations, the mail is being processed incorrectly and being filled from the wrong variables.

If you verify the sender email when you look at what is being sent you will find this is what is happening. Look at an email headers that has been sent from OSB. You will see that the company email address is actually the logged in users email.

I looked a little at the source and am trying to discern, where does "mailfrom" become populated?
Code:
$data['mailfrom'] = $config->get('mailfrom');
Please test on your end to see what I am showing you here.
The email in the from field is not correct, and all of the emails going out, the one being sent to the consultant as well as the system booking email and the one sent to the client. All of them have the same email. The user that is booking the appointments email address.

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #66882 by Mr. Dam
Hi Philip,
To be honest, i am not sure with your problem in this topic. It's the first time i received the report about the Email problem.
I also don't know where can you find
Code:
$data['mailfrom'] = $config->get('mailfrom');
in the source code. Because all "send email" function are defined in file: helpers > common.php and mail from must be get from global configuration of Joomla through this command
Code:
$config = new JConfig(); $mailfrom = $config->mailfrom;
We use Joomla core function to send email
Code:
$mailer->Sendmail($mailfrom,$fromname,$order_email,$sbj,$body,1);
As you can see in above code
$mailfrom and $fromname are 2 global variables of Joomla.
So that, if the emails can't be sent, the only reason is from your server doesn't allow to send email. Please submit ticket and send your site information with super admin account. I will check and let you know the reason of problem. It will save time of us.
Thank you for your understanding
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. Dam