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

An error occurred while sending an email: 'Method not found: 'MimeKit.MimeEntity MimeKit.AttachmentCollection.Add(System.String, System.IO.Stream)'.' #11245

Closed
ericrrichards opened this issue Feb 22, 2022 · 4 comments

Comments

@ericrrichards
Copy link

Describe the bug

I have another library that I am using that depends on MailKit/MimeKit 3.1.0, and if I include that library, the OrchardCore.Cms.Email feature stops working. All attempts to send emails through the ISmtpService generate this error:

An error occurred while sending an email: 'Method not found: 'MimeKit.MimeEntity MimeKit.AttachmentCollection.Add(System.String, System.IO.Stream)'.'

To Reproduce

Steps to reproduce the behavior:

  1. Include MailKit 3.1.0 and MimeKit 3.1.0 in an OrchardCMS project

  2. Enable and configure the Email feature

  3. Go to 'https://localhost/Admin/Email/Index'

  4. Click on 'Test Settings'

  5. Fill out the form to send a basic email with recipient, subject and body

  6. See error

  7. Remove references to MailKit 3.1.0 and MimeKit 3.1.0

  8. Rerun steps 3,4,5

  9. Mail is sent successfully

@hishamco
Copy link
Member

Why you need to reference MailKit and MimeKit, OC.Email.Module is already referenced them

@ericrrichards
Copy link
Author

ericrrichards commented Feb 22, 2022 via email

@hishamco
Copy link
Member

I will bumb the versions ...

@hishamco
Copy link
Member

Seems @agriffard already updated the versions here, so please use the nightly builds

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

2 participants