If you are sending an email from a component etc using Factory::getMailer then you can set the mailfrom and from name quite easily.
But as far as I can see if you are using MailTemplate then there is no way to set the mailfrom email or name and it will only use the settings from global configuration.
Is that correct?
Labels |
Added:
No Code Attached Yet
|
I had a go at adding this missing functionality but failed :(
@brianteeman what was the reason of you failing to add it?
Labels |
Added:
?
|
Hi @brianteeman ,
Sorry to hear that you were not able to add the missing functionality to MailTemplate. Can you tell me a bit more about what you tried and what issues you encountered? Maybe I can offer some suggestions or insights to help you troubleshoot the problem.
In the meantime, I have a possible solution that might work for you. You could try using the setSender method of the JMail class to set the mailfrom email and name.
Here's an example:
$mailer = JFactory::getMailer();
$mailer->setSender('example@example.com', 'Example Name');
This should override the global configuration settings for mailfrom email and name and use the values you set instead.
Let me know if this works for you or if you have any further questions.
@brianteeman hehe :)
If he was in Dan mode it would be hard to tell apart if it's gpt or someone just toxic that likes to help in joomla
Yes, you are right. This is missing feature in MailTemplate.