Feature #193
Change FROM address of TicketNotification Email
Status: | New | Start date: | 05 Apr 2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - |
Description
Hello Gary,
I was wondering if it is not possible to set the FROM Address in the ticket notification email?
Swift_TicketNotification.php:
I'm trying to set the $_customFromEmail variable to the email address of the actual customer, but no email is sent when the address differs from the one configured for the queue!
Any suggestions how to solve this?
Background: New Ticket Notification Mails are tracked in another system and resolved to a customer record by the sender-email.
History
Updated by Gary Mcgrath about 12 years ago
Hi there,
You could use the ticket email ( the users email owning the ticket ) as the from address, e.g. in the notification where it sends the actual email, alter the from address like so
$_SWIFT_TicketObject = new SWIFT_Ticket(new SWIFT_DataID($this->Ticket->GetTicketID()));
$this->Mail->SetFromField($_SWIFT_TicketObject->GetProperty('email'), IIF, SWIFT::Get('companyname'), $_customFromName));
Gary
Updated by Stefan Hobratschk about 12 years ago
Hi Gary,
thank you for your quick reply.
Maybe it is a configuration issue, but even when I hardcode the FROM Address
$this->Mail->SetFromField("customer@somedomain.com", ""); //no email received (also not in Junk Email Folder)
I don´t receive a notification email!
but when I use the email of the Queue its working:
$this->Mail->SetFromField(Queie Email address", ""); //email received
OK
Stefan
Updated by Gary Mcgrath about 12 years ago
That will be your SMTP email server refusing to accept the outbound email.
( Some servers don't like "sending" mail from an account not held by themselves ) Its called relaying and its how spammers work, so SMTP servers often don't let you do it.
You might need to configure your smtp server to allow it
Gary
Updated by Stefan Hobratschk about 12 years ago
Hi Gary,
You are right, I had to allow email relaying and now it´s working.
Thanks