Body: <p>I just switched a CiviCRM installation over to Amazon AWS's SES email service, which will ONLY send our from verified domain email addresses. The CiviMail forward-to-a-friend link form assumes the email can come from the sender's address. (And this is all a bit of a security concern regarding misuse of an email server, too.)</p>
  <p>No matter what I do, the form returns the error &quot;Mailing is not forwarded to the given email address.&quot;</p>
  <p>The version of the form which &quot;ships&quot; with CiviCRM does not allow for the from email address to be changed anywhere, and does not seem to include the Display Name of a sender.</p>
  <ol>
  <li>I attempted to edit ForwardMailing.php to use the server's default email address as the from address (hard coded; better if could be system variable); I think perhaps I only have it <em>displaying</em> that address but it still is trying to <em>use</em> the recipient's address</li>
  </ol>
  <pre><code> if ($hash) {
        $emailId = CRM_Core_DAO::getfieldValue('CRM_Mailing_Event_DAO_Queue', $hash, 'email_id', 'hash');
        $this-&gt;_fromEmail = 'ouraddress@AWSverifiedexampledomain.org';
      //$fromEmail = CRM_Core_DAO::getfieldValue('CRM_Core_DAO_Email', $emailId, 'email');
        $this-&gt;assign('fromEmail', $fromEmail);
        
      }
  </code></pre>
  <ol start="2">
  <li>I would like it to show as sent by our server &quot;on behalf of Display Name &quot; and then in the text say that &quot;DisplayName is forwarding you this email.&quot;</li>
  <li>Is there a way to have the optional comment fields expanded by default on the form? They are not very obvious to most users.</li>
  </ol>
  <p>Thanks in advance.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-04T20:25:13.577Z
Comments.Text: Did you work this out? I'm trying to do the same thing (ask our list to reach out to their lists for an event).
Comments.UserDisplayName: kathc
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-05T22:42:59.203Z
Comments.Text: No. It remains on my to-do list, I'm afraid. The limitations on the from address with SES has been very frustrating. Rears it's head when least expected.
Comments.UserDisplayName: TimETown
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-07T04:05:19.220Z
Comments.Text: @TimETown There's an extension called "Outbound Domain Enforcement" that help Civi not send with an unvalidated domain. @ kathc to be clear, you won't have the problem TimETown is describing if you don't use a third-party mailing company that requires validating outbound email domains.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-08T13:38:39.007Z
Comments.Text: We're talking about using the {action.forward} which asks people we're sending email to, to send it on (but tell us about it).It doesn't work with SES or Sparkpost. I found some very old message about changing the forwarding behaviour to make it show the forwarder's name and email but actually use the original sender. For my immediate use, I'll just ask people to forward our registration message and hope that works to get people to our event (it just won't show us who invited them).
Comments.UserDisplayName: kathc
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-11T15:13:55.047Z
Comments.Text: This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://civicrm.stackexchange.com/questions/ask). You can also [add a bounty](https://civicrm.stackexchange.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](https://civicrm.stackexchange.com/help/whats-reputation). - [From Review](/review/low-quality-posts/11275)
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civimail><email><tokens><smtp>
Title: Forward to Friend broken; customizing the form
ThreadText: # Forward to Friend broken; customizing the form
  
  (Asked by: username_0 on 2020-08-10)
  
  I just switched a CiviCRM installation over to Amazon AWS's SES email service, which will ONLY send our from verified domain email addresses. The CiviMail forward-to-a-friend link form assumes the email can come from the sender's address. (And this is all a bit of a security concern regarding misuse of an email server, too.)
  No matter what I do, the form returns the error "Mailing is not forwarded to the given email address."
  The version of the form which "ships" with CiviCRM does not allow for the from email address to be changed anywhere, and does not seem to include the Display Name of a sender.
  
  I attempted to edit ForwardMailing.php to use the server's default email address as the from address (hard coded; better if could be system variable); I think perhaps I only have it displaying that address but it still is trying to use the recipient's address
  
   if ($hash) {
        $emailId = CRM_Core_DAO::getfieldValue('CRM_Mailing_Event_DAO_Queue', $hash, 'email_id', 'hash');
        $this->_fromEmail = 'ouraddress@AWSverifiedexampledomain.org';
      //$fromEmail = CRM_Core_DAO::getfieldValue('CRM_Core_DAO_Email', $emailId, 'email');
        $this->assign('fromEmail', $fromEmail);
        
      }
  
  
  I would like it to show as sent by our server "on behalf of Display Name " and then in the text say that "DisplayName is forwarding you this email."
  Is there a way to have the optional comment fields expanded by default on the form? They are not very obvious to most users.
  
  Thanks in advance.
  
  **Tags:** civimail, email, tokens, smtp
  
  > **Comments:**
  > **username_1**: Did you work this out? I'm trying to do the same thing (ask our list to reach out to their lists for an event).  
  > **username_0**: No. It remains on my to-do list, I'm afraid. The limitations on the from address with SES has been very frustrating. Rears it's head when least expected.  
  > **username_2**: @username_0 There's an extension called "Outbound Domain Enforcement" that help Civi not send with an unvalidated domain. @ username_1 to be clear, you won't have the problem username_0 is describing if you don't use a third-party mailing company that requires validating outbound email domains.  
  > **username_1**: We're talking about using the {action.forward} which asks people we're sending email to, to send it on (but tell us about it).It doesn't work with SES or Sparkpost. I found some very old message about changing the forwarding behaviour to make it show the forwarder's name and email but actually use the original sender. For my immediate use, I'll just ask people to forward our registration message and hope that works to get people to our event (it just won't show us who invited them).  
  > **username_2**: This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://civicrm.stackexchange.com/questions/ask). You can also [add a bounty](https://civicrm.stackexchange.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](https://civicrm.stackexchange.com/help/whats-reputation). - [From Review](/review/low-quality-posts/11275)  
  
  ---
  
  ## 0 answers
  
  