Jump to content
  • 0

Setting An Email Return-Path For Bounces


Darin

Question

6 answers to this question

Recommended Posts

  • 0

Found it!
 
In components/email/email.php at line 90

private function newMessage() {
  $this->message = Swift_Message::newInstance();
  $this->message->setMaxLineLength($this->max_line_length);
  
  $this->message->setCharset($this->charset);
}

add this line before the closing curly bracket:

$this->message->setReturnPath('bounces@example.com');

so that you end up with this:

private function newMessage() {
  $this->message = Swift_Message::newInstance();
  $this->message->setMaxLineLength($this->max_line_length);
		
  $this->message->setCharset($this->charset);
  $this->message->setReturnPath('bounces@example.com');
}

It will add your custom return-path to outgoing mail.
 
It would be nice to see this as an option for each company in Settings.

Link to comment
Share on other sites

  • 0

That should be done via the control panel / mail program if I understand you correctly, we can do it on InterWorx:

 

 

 

that for serverwide . the OP ask i think for single account , with return-patch else than the sender email . this option should be added the email header php .

 

i have not make a deep looking for it . but i believe it should do some tweak in php file .

Link to comment
Share on other sites

  • 0

Correct. I don't want to change it server-wide, just for mail sent from Blesta.

 

After some more digging, it looks like Blesta uses Swift Mailer for email. According to the Swift Mailer docs, it's possible to set a separate return-path, but I couldn't find the identical code in Blesta's implementation. Unfortunately, I don't know enough about coding to recognize variations, so I'm not sure what change, or where to change it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...