gnsbud
gnsbud
Offline
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
Responses (3)
  • Accepted Answer

    Monday, September 15 2014, 04:43 PM - #Permalink
    0
    hello,

    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?
    The reply is currently minimized Show
  • Accepted Answer

    gnsbud
    gnsbud
    Offline
    Monday, September 15 2014, 05:14 PM - #Permalink
    0
    Hi,

    yes, my code is working fine, does exactly what I want, I posted it just as a suggestion for you. Just saying it would be fine to have similar option implemented by you by default and you name it exactly as I wanted to express - "Send the emails from that account:".

    Best regards,
    Chris
    The reply is currently minimized Show
  • Accepted Answer

    Monday, September 15 2014, 05:18 PM - #Permalink
    0
    oh! ok :)

    definitely will think about this. thanks for the suggestion!
    The reply is currently minimized Show
Your Reply