Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendEmail(IEmailMessage) doesn't work #112

Open
scastria opened this issue Apr 17, 2019 · 1 comment
Open

SendEmail(IEmailMessage) doesn't work #112

scastria opened this issue Apr 17, 2019 · 1 comment

Comments

@scastria
Copy link

There are 2 ways to send an email:

SendEmail(IEmailMessage)
SendEmail(string,string,string)

The second option is NO GOOD if you need to specify a CC recipient. Therefore, I MUST use the first option.

The first option IS COMPLETELY BROKEN!! The concrete EmailMessage class that implements the IEmailMessage is marked INTERNAL. Therefore, the only way to use the first option is to write my own class that implements IEmailMessage. That WILL NOT WORK either since the Android implementation of EmailTask tries to cast the IEmailMessage argument as the internal EmailMessage class to check for isHtml. Of course, my class cannot be cast as the internal EmailMessage because it is INTERNAL.

Either make the internal EmailMessage public OR modify the IEmailMessage interface so that it includes isHtml so that the Android implementation does NOT have to cast the argument as the concrete EmailMessage class.

@scastria
Copy link
Author

It looks like the solution is to use the EmailMessageBuilder class. However, I still think the code is wrong in that if a method accepts an IEmailMessage, it should accept ANY class that implements that interface. If the method needs to cast the argument to a concrete EmailMessage, then THAT concrete class should be the argument type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant