Change from email address when replying to a customer

lock
push_pin
done
Answered
0

Hello

Is it possible to override the from email address when replying a ticket? I can't see it's possible to add the from address in the Message-object. 

-Frode

6 Jan 2016 | 12:00 AM

All Replies (0)

There is some logic in CS regarding which from-address it will use. If the e-mail was sent in to one adress, then that will be used as the from address.

If the ticket is created manually in CS, and you have f.instance a mailbox called 'invoice@example.com' which is connected to the Invoice-category, then CS will use that address as the from-address if your ticket is connected to that category.

I don't think you can manually override it without either making some sort of script or SQL job.

6 Jan 2016 | 12:00 AM

Hi frode,

 

Do you mean in the user interface or in script?

If in script:

 

Email email;
email.setValue("from", "test@test.nl" );

6 Jan 2016 | 12:00 AM

Thanks for answering. But do you know which table in the database I can update with the "new" from address before the services sends the email?

6 Jan 2016 | 12:00 AM

Niels, I want to add a drop-down list with several emails which user can select from "Edit ticket"-screen. I was hopeing to change the code on the "OK"-button.

6 Jan 2016 | 12:00 AM

You can override the fields: ticket.filter_id and ticket.display_filter

filter_id points to a mailbox in your system and display_filter points to the given address.

By setting these attributes to something else you can change the from address before you send the reply.

Example:

ticket.filter_id = 1
ticket.display_filter = post@company.com 

 

You can update them like this if you want:

// Update from address
SearchEngine se;
se.addData("ticket.filter_id", "1");
se.addData("ticket.display_filter", "post@company.com");
se.addCriteria("ticket.id", "Equals", ticketId);
se.update();

// Rest of the code
// ...

 

6 Jan 2016 | 12:00 AM

Thank you, Simen!

7 Jan 2016 | 12:00 AM

Add reply