You need to sign in to do that
Don't have an account?

want to send Email Alert to current user
I want to send an Email Alert to the current user. I tried putting:
{!$User.email}
into the Additional Emails text box, but got the message:
Error: Email addresses must be valid emails
Is there a different way to do this, or must I go to a trigger?
{!$User.email}
into the Additional Emails text box, but got the message:
Error: Email addresses must be valid emails
Is there a different way to do this, or must I go to a trigger?
Try the below code to send an email to logged in user:
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
string [] toaddress=New string[]{UserInfo.getUserEmail()};
email.setSubject('Regarding:'Send alert to user');
email.setPlainTextBody('want to send Email Alert to current user');
email.setToAddresses(toaddress);
Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Faced the same issue: For solution, we used Related User: Last Modified By
We use this because the workflow is initiated because the logged-in user made some changes over the record and the person is the one fetched in Last Modified by.
Can use Email Alerts when we want to send the email to the login user.