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

Blank email body when trying to use plain text and HTML #151

Open
bradykelly opened this issue May 9, 2016 · 3 comments
Open

Blank email body when trying to use plain text and HTML #151

bradykelly opened this issue May 9, 2016 · 3 comments

Comments

@bradykelly
Copy link

I first just tried your main example, with no specification of plain or HTML. That rendered my hyperlink in plain text. Then, I tried following your example for both, which produced a correctly addressed mail, but with no body.

I have one Register.html with From, To, etc. then I have Register.Text.cshtml with the below header, and no HTML.

Content-Type: text/plain; charset=utf-8

Then I have Register.Html.cshtml, with below header, and and HTML body with a hyperlink:

Content-Type: text/html; charset=utf-8

Now all I get is a blank body when I send myself a mail.

I actually only want an HTML mail, but even just removing the plain text template still gives me a blank body.

@codymaust
Copy link

I'm seeing the same problem, using the latest package from NuGet.

@adi-p
Copy link

adi-p commented Oct 28, 2016

I had this issue, fixed it by having a blank line between the line with the content type and the rest of the template.

@darronclarison412
Copy link

It seems like you're facing challenges with rendering the HTML body in your email. Ensure your HTML template is structured correctly with proper HTML tags and styling. Also, check for any formatting or syntax errors that might be causing the blank body. Testing by sending a basic HTML email Here first can help isolate the issue. Double-check the content-type header and ensure it's set to 'text/html'.

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

4 participants