SendEmail method is private and not accessible

This forum is for programmers who have questions about the source code.
Post Reply
pid_user
Posts: 67
Joined: Thu Jun 04, 2015 9:31 am

SendEmail method is private and not accessible

Post by pid_user » Wed Jun 23, 2021 11:17 pm

Please make following methods as public so that can be accessible via third party app.

public class EmailMessages
{
///<summary>Throws exceptions. Attempts to physically send the message over the network wire. This is used from wherever email needs to be sent throughout the program. If a message must be encrypted, then encrypt it before calling this function. nameValueCollectionHeaders can be null.</summary>
private static void SendEmailUnsecure(EmailMessage emailMessage,EmailAddress emailAddress,NameValueCollection nameValueCollectionHeaders,bool hasRetried=false,params AlternateView[] arrayAlternateViews) {
//No need to check RemotingRole; no call to db.
//When batch email operations are performed, we sometimes do this check further up in the UI. This check is here to as a catch-all.
}

///<summary>Throws exceptions. Uses the Direct library to sign the message, so that our unencrypted/signed messages are built the same way as our encrypted/signed messages. The provided certificate must contain a private key, or else the signing will fail (exception) when computing the signature digest.</summary>
private static void SendEmailUnsecureWithSig(EmailMessage emailMessage,EmailAddress emailAddressFrom,X509Certificate2 certPrivate) {
if(emailAddressFrom.IsImplicitSsl) {
throw new Exception(Lans.g("EmailMessages","Digitally signed messages cannot be sent over implicit SSL."));//See detailed comments in the private version of SendEmailUnsecure().
}

Post Reply