function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matt Cooper 7Matt Cooper 7 

ReplyTo email address using Visualforce email templates but sending through apex

I have been working on creating a Visualforce page that allows you to choose users and send out emails to those users using apex. The problem I have run into is that the email address that the user can reply to is not working properly. The template I am using is a Visualforce email template which has the replyto email address already input into the template. However, when I reply to the email sent from the apex code, it replies back to the sender, not the email address in the template.

I tried to include the setReplyTo() functionality in my apex, but I get an error when sending a Visualforce email template if I try to choose a replyto email in my apex.

Anyone have any ideas on how to get this working? Let me know if you want me to show my code.

Thanks!