smsohan / MvcMailer

A Mailer for ASP.Net MVC that forms the Email Body using MVC Views (Razor etc.) following Ruby on Rails ActionMailer style
MIT License
584 stars 178 forks source link

extra . being added to email #29

Closed steveoh closed 12 years ago

steveoh commented 12 years ago

I have a cshtml view thats pretty basic.

Dear @ViewBag.User.Name,

We appreciate your interest in the app. Your information has been recieved but you have not been granted access. You will receive an email from an administrator with further instructions.

Your user name is: @ViewBag.User.email

Thank you for your patience,

The email sent has two periods on the end of instructions. Thoughts?

It doesn't mess with the period after app either just the one after instructions.

smsohan commented 12 years ago

I am not sure I understand your problem. Can you please be more specific?

steveoh commented 12 years ago

I have the above view and send an email and it ends up looking like

Dear User Name,

We appreciate your interest in the app. Your information has been recieved but you have not been granted access. You will receive an email from an administrator with further instructions..

Your user name is: x@y.gov

Thank you for your patience,

smsohan commented 12 years ago

What if you add some text right after the dot? Do you still see 2 dots? I think it's coming from your view template.


Sent from my iPhone S M Sohan

On 2011-10-20, at 4:36 PM, steve reply@reply.github.com wrote:

I have the above view and send an email and it ends up looking like

Dear User Name,

We appreciate your interest in the app. Your information has been recieved but you have not been granted access. You will receive an email from an administrator with further instructions..

Your user name is: x@y.gov

Thank you for your patience,

Reply to this email directly or view it on GitHub: https://github.com/smsohan/MvcMailer/issues/29#issuecomment-2475412

steveoh commented 12 years ago

If i add text after the period there are still two. i swear i haven't smoked crack today! http://gyazo.com/a54998b7a76f2fd1af99fbe24c6dad0f

smsohan commented 12 years ago

Did you try a different email client/address?


Sent from my iPhone S M Sohan

On 2011-10-20, at 4:55 PM, steve reply@reply.github.com wrote:

If i add text after the period there are still two. i swear i haven't smoked crack today! http://gyazo.com/a54998b7a76f2fd1af99fbe24c6dad0f

Reply to this email directly or view it on GitHub: https://github.com/smsohan/MvcMailer/issues/29#issuecomment-2475593

steveoh commented 12 years ago

I'm dropping the email on the filesystem. I will try a different email client. Why did you close this issue?

steveoh commented 12 years ago

same .. issue in thunderbird

smsohan commented 12 years ago

Can you send me a small project with this problem? I can try and reproduce it locally.


Sent from my iPhone S M Sohan

On 2011-10-24, at 10:48 AM, steve reply@reply.github.com wrote:

same .. issue in thunderbird

Reply to this email directly or view it on GitHub: https://github.com/smsohan/MvcMailer/issues/29#issuecomment-2505947

steveoh commented 12 years ago

http://dl.dropbox.com/u/14815756/RoadKill.rar

ding me so i can delete that after you download it. it's the confirm() that's double perioding.

steveoh commented 12 years ago

funky it's not doing it anymore and i didn't change anything.

smsohan commented 12 years ago

Good that I didn't spend time on it :)

Sohan http://smsohan.com skype:smsohan | gtalk:sohan39 | cell: 403-714-2673

On Mon, Oct 24, 2011 at 4:09 PM, steve < reply@reply.github.com>wrote:

funky it's not doing it anymore.

Reply to this email directly or view it on GitHub: https://github.com/smsohan/MvcMailer/issues/29#issuecomment-2510239

miniragnarok commented 11 years ago

I've had this issue happen in two projects.

When I open the email in Notepad++ there is certainly an extra period. I've managed to recreate it a few times. If for example, you have the number 499.99, it will display as 499..99 if the period is the start of a new line. So in Notepad++ it looks like:

<>Lots of code</> 499= ..99=0D=0A <>Lots more code</>=

My temporary fix is to add some spaces so that it moves at least one space:

<>Lots of code</> &nb= sp;499.99=0D=0A <>Lots more code</>=

sjk07 commented 9 years ago

This is an Encoding issue that comes from System.Net.Mail Add this to the SendMail:

Mail.BodyEncoding = System.Text.Encoding.UTF8;