non useful log about wrong e-mail address format

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
11/28/2009 1:27:04 PM
Gravatar
Total Posts 18439

Re: non useful log about wrong e-mail address format

I'll send the dll shortly, backup your original just in case. The new dll will support utf-8, utf-32, or unicode encoding and will handle splitting the to addess on either comma or semi colon and it has better log messages. If an unknown encoding is used it will use utf-8. It also supports splitting for cc and bcc but these are not used by the contact form. Those are the only changes at this time.

No it does not currently support anything but email address.

Thanks,

Joe

11/28/2009 1:45:43 PM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: non useful log about wrong e-mail address format

.NET and SMTP should support any encoding, as long as you use base64 for the TransferEncoding (for single-byte ones you could also use QuotedPrintable [instead of 7-bit which will eat up data for sure], but using base64 is best since it also support multibyte ones like UTF-16 [the classic Unicode encoding]).

 

At LvS, at LvS_Utilities\subtitles\BaseSubtitleWriter.vb, I'm using:

 

Using writer As New StreamWriter(path, False, theEncoding)

  WriteSubtitles(subtitles, writer)

End Using

 

so you could use StreamWriter to write to any encoding the user told you to use, then tell .NET to use base64 for the TransferEncoding so that SMTP can transfer it fine

My experience on the above is from lots of research I had to do recently to fix osCommerce (well known PHP store) to send e-mails with Greek text. BTW, in osCommerce they have a store name that is used as the display name for e-mails (decent e-mail clients show both the display name AND the e-mail address, so there's no issue with phising - anyway SMTP headers can be faked to say anything - my comment regarding spam filters was that I think they have higher chance to catch a post that just has a newly seen from e-mail address with no display name, but I might be wrong with that [could check SpamAssassin's rulebase for example, although other engines use PETRI nets, neural nets etc. that are not always easy to checkout])

11/28/2009 1:56:33 PM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: non useful log about wrong e-mail address format

btw, regarding encoding display names, the following:

    =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=

means ISO-8859-2 base64 encoding 

 

and

    =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf*nada.kth.se> 

means ISO-8859-1 quoted-printable encoding (I replaced @ with * to cater for spam-bots)

 

Take a look at IETF's RFC 1522 (but maybe easier is to look at the PHP link I had sent to, has useful discussion at the bottom of that page, and if I remember well code samples that you could adapt too)



11/28/2009 2:06:53 PM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: non useful log about wrong e-mail address format

Also, regarding message body, .NET supports any encoding from what I understand, according to what is written at reference of BodyEncoding class on MSDN, not just us-ascii and "Unicode" (in the general sense) ones, like UTF-8, UTF-16 (this is called Unicode encoding officially in .NET if I'm not mistaken) and UTF-32. It's just that for the last 3 ones .NET selects a TransferEncoding of Base64 (instead of 7-bit or QuotedPrintable) for the MailMessage. 

From your replies above I understood you were saying .NET doesn't support say Russian encoding (or ISO-8859-7 [Greek]) etc. which doesn't sound accurate (in fact some older mail clients don't support UTF-8 so many admins would opt for using ISO-8859-7 in Greece)

11/28/2009 2:08:52 PM
Gravatar
Total Posts 18439

Re: non useful log about wrong e-mail address format

Adding display name is not a high priority concern for me at this time, not one person has ever requested it before. I may look into it at some point but there are many more useful and interesting things to work on.

Best,

Joe

11/28/2009 2:12:45 PM
Gravatar
Total Posts 18439

Re: non useful log about wrong e-mail address format

I will look into additional body encodings, if you find a comprehensive list of ones used in email and supported in .NET let me know as that would be helpful. I figured that generally everyone could use the unicode ones. Seems like modern email clients should handle this.

11/28/2009 2:14:15 PM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: non useful log about wrong e-mail address format

I think if one has a store they expect to be able to send e-mails displaying the store name, not the e-mail address, plus also spam filters I think will catch such e-mails at highest probability if they have a plain e-mail address (I might be wrong on that, but that's my feeling)

11/28/2009 2:20:05 PM
Gravatar
Total Posts 18439

Re: non useful log about wrong e-mail address format

When I get confirmation from amazon.com it comes just from auto-confirm@amazon.com and when I get email from PayPal it comes from service@paypal.com. In some ways I think display name is dangerous for commerce because it is shown instead of the email in some clients and may be easier to do phishing with that approach.

I see display name as a nice to have but not high priority.

Best,

Joe

11/28/2009 2:48:15 PM
Gravatar
Total Posts 18439

Re: non useful log about wrong e-mail address format

I found this list of text encodings on msdn, note that there is an * on the right column if it is supported in .NET and it says iso-8859-7 (Greek) is not supported. So it seems what is supported by .NET on the server would be more of a concern than what is supported on some old legacy email clients that some very small percent of users may use and the unicode family of encodings would be the preferred way to go.

Best,

Joe

11/28/2009 2:56:18 PM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: non useful log about wrong e-mail address format

The * is what is supported irrespective of codepages installed on the server. Such codepages are installed from Regional Settings (or if you have localized OS are preinstalled). You'd expect that an admin who wants to send ISO-8859-7 Greek text will have that codepage on their server, or ask their host (say if they use shared hosting) to add it (easy and no real overhead to do [just tiny disk space fraction to install the .NLS file]).

11/28/2009 3:02:48 PM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: non useful log about wrong e-mail address format

Somehow it lost another post I just did where I was saying that StreamWriter constructor has Encoding parameter. You can tell it to use any encoding (as long as appropriate codepages are installed on the system if the encoding isn't supported out of the box by .NET)

So you encode the text (from Unicode that mojoPortal uses internally I assume) to any encoding the user asked for and then you tell .NET to use TransferEncoding of base64 (to format the data for SMTP transfer since SMTP supports 7-bit, 1000 chars per line internally or something). Could use QuotedPrintable for single byte ones like ISO-8859-7 (not 7-bit that would probably zero the 8th bit), but base64 covers multibyte ones too like classic Unicode (UTF-16) or UTF-32 so it's better to use that for any non us-ascii encoding (including Greek, Russian etc.)

You must sign in to post in the forums. This thread is closed to new posts.