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
SUJAY GANGULYSUJAY GANGULY 

I want to add a hyperlink and logo from static resource in Apex Single message

I want to add a Payment link in apex single message with two values but when I click the link its not working. Also, I want to add a logo from the static resource.Please tell me how can I do this? I also write my single message code here. acc and opp is the two string value that im taking from account and opportunity and I have to put it in that link.

 List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
                   Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
            
                    String messageBody = '<html><body><br>Hello<br/>'+'Please click the below Pay Now link for make your payment.'+'<a href="http://localhost:50673/payment/Authorize/?+Acc+','+Opp">Pay Now</a>'+'</body></html>';
                    mail.setHtmlBody(messageBody);
                    mail.setSubject('Link');
                    mail.setToAddresses(EmailAddress);
                   // string Url='';
                    mails.add(mail);
                    Messaging.sendEmail(mails);