Page 1 of 1

Email Templates not working with customer/merchant

Posted: Sun Dec 21, 2014 1:42 pm
by RickSilver
Using AC Gold, I'm finding that using the keywords customer or merchant in the To and From fields doesn't work. Only when I change them to a valid email address, do they get sent out. The store has a valid default email address set.

Thanks
Rick

Re: Email Templates not working with customer/merchant

Posted: Sun Dec 21, 2014 5:26 pm
by rmaweb
Where are you sending the emails from? The order details screen or somewhere else?

Re: Email Templates not working with customer/merchant

Posted: Sun Dec 21, 2014 6:02 pm
by RickSilver
These are being sent by triggers, such as when the customer places an order or an order is shipped. It also doesn't seem to be sending to the CC and BCC fields either. I've checked my spam folder.

Rick

Re: Email Templates not working with customer/merchant

Posted: Sun Dec 21, 2014 11:51 pm
by nadeem
Which Ablecommerce build are you using?

Re: Email Templates not working with customer/merchant

Posted: Mon Dec 22, 2014 6:55 am
by RickSilver
Using Gold version. Customer seems to work now but it's ignoring the addresses in CC and BCC.

Re: Email Templates not working with customer/merchant

Posted: Mon Dec 22, 2014 11:34 pm
by nadeem
There was an issue with CC and BCC when sending the email via admin in R8 and prior Gold versions. This has been fixed in R9. If you are facing the same issue, you can try the following fix:

Open Website/Admin/UserControls/SendEmail.ascx, locate the following

Code: Select all

<tr>
   <th style="width:90px" valign="top">
        <asp:Localize ID="ToAddressLabel" runat="Server" Text="Send To:" EnableViewState="false"></asp:Localize>
   </th>
   <td>
        <asp:Literal ID="ToAddress" runat="Server" EnableViewState="false"></asp:Literal>
    </td>
</tr>
and replace with

Code: Select all

<tr>
   <th style="width:90px" valign="top">
        <asp:Localize ID="ToAddressLabel" runat="Server" Text="Send To:" EnableViewState="false"></asp:Localize>
   </th>
   <td>
        <asp:Literal ID="ToAddress" runat="Server" EnableViewState="false"></asp:Literal>
    </td>
</tr>
 <tr>
      <th>
            <asp:Localize ID="CCAddressLabel" runat="Server" Text="Send CC To:" EnableViewState="false"></asp:Localize>
      </th>
      <td>
            <asp:TextBox ID="CCAddress" runat="Server" MaxLength="250" Width="250px"></asp:TextBox>
      </td>
</tr>
<tr>
     <th>
          <asp:Localize ID="BCCAddressLabel" runat="Server" Text="Send BCC To:" EnableViewState="false"></asp:Localize>
    </th>
    <td>
         <asp:TextBox ID="BCCAddress" runat="Server" MaxLength="250" Width="250px"></asp:TextBox>
     </td>
</tr>
Similarly Open the code-behind file i.e. Website/Admin/UserControls/SendEmail.ascx.cs, locate the following code inside GetMailMergeTemplate() method

Code: Select all

 MailMergeTemplate mergeTemplate = new MailMergeTemplate();
and replace with

Code: Select all

MailMergeTemplate mergeTemplate = new MailMergeTemplate();
mergeTemplate.CCList = CCAddress.Text;
mergeTemplate.BCCList = BCCAddress.Text;
Also locate the following code inside EmailTemplates_SelectedIndexChanged event

Code: Select all

MailAddress fromAddress = emailTemplate.ParseAddress(emailTemplate.FromAddress);
and replace with

Code: Select all

MailAddress fromAddress = emailTemplate.ParseAddress(emailTemplate.FromAddress);
CCAddress.Text = emailTemplate.CCList;
BCCAddress.Text = emailTemplate.BCCList;
Hope this helps.

Re: Email Templates not working with customer/merchant

Posted: Fri Jan 02, 2015 3:57 pm
by RickSilver
Thanks but this is not the problem. I'm referring to emails going out by a trigger, not from an admin page. Still need help.

Re: Email Templates not working with customer/merchant

Posted: Fri Jan 02, 2015 5:36 pm
by rmaweb
Hello Ricksilver,

Which gold build are you using? Looking for r1-9 number. This way I can try to look at the code for that version.

Re: Email Templates not working with customer/merchant

Posted: Sat Jan 03, 2015 8:15 am
by RickSilver
GoldR9 (build 7670)