0
Hi,
I have 3 different websites (different domains) with one database (some Virtuemart2 tables shared with each other), I have installed IM on one website. My vendors sometimes must create invoice/quote from different domain than IM is installed on and I don't want to have component installed on all websites, I want to use only one backend. I can see in IM component options fields "From (name) on emails" and "From (email) on emails", if I set "some@domain1.com", or if empty, emails are coming only from that domain, even if I have many invoice templates where "from_email" is different than "some@domain1.com", so I figure it out this way:
in IM component options "From (name) on emails": {from_name}
in IM component options "From (email) on emails": {from_email}
in /components/com_invoices/models/invoice.php in sendMail function around line 183 I changed to this (similar to $subject variable in the same function):
$from = $params->get('email_email') ;
$from = str_replace("{from_email}", $data->from_email, $from) ;
$from_name = $params->get('email_name') ;
$from_name = str_replace("{from_name}", $data->from_name, $from_name) ;
If you get the point, maybe you could implement something like above example in your future update?
Best regards,
Chris
I have 3 different websites (different domains) with one database (some Virtuemart2 tables shared with each other), I have installed IM on one website. My vendors sometimes must create invoice/quote from different domain than IM is installed on and I don't want to have component installed on all websites, I want to use only one backend. I can see in IM component options fields "From (name) on emails" and "From (email) on emails", if I set "some@domain1.com", or if empty, emails are coming only from that domain, even if I have many invoice templates where "from_email" is different than "some@domain1.com", so I figure it out this way:
in IM component options "From (name) on emails": {from_name}
in IM component options "From (email) on emails": {from_email}
in /components/com_invoices/models/invoice.php in sendMail function around line 183 I changed to this (similar to $subject variable in the same function):
$from = $params->get('email_email') ;
$from = str_replace("{from_email}", $data->from_email, $from) ;
$from_name = $params->get('email_name') ;
$from_name = str_replace("{from_name}", $data->from_name, $from_name) ;
If you get the point, maybe you could implement something like above example in your future update?
Best regards,
Chris
Responses (3)
-
Accepted Answer
0hello,
it's not really how it works.. the "from_email", and its token, {from_email}, refer to the email apearing in the invoice details, it isn't used to actually "send the emails from that account."
I understand your idea and what you want to do, but as you point out yourself, a bit of coding would be necessary for this. your code actually seems pretty much the way to do it. have you tried it? -
Accepted Answer
-
Accepted Answer
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »