נושא ישן - אבל כואב: עברית ו-CDOSYS,
שלום חברים קראתי את המאמר http://www.webmaster.org.il/article.asp?id=189 אבל יש לי רק הצלחה חלקית - שורת הנושא נופיעה בעברית (שזה כבר התקדמות), אבל התוכן לא - ורק אחרי שאני משנה באימייל שהתקבל ל-ENCODING בעברית, רק אז זה מוצג כראוי. השאלה איך זה יכול להיות טוב גם בלי השינוי הידני אצל הנמען. (אגב - השרת נמצא בחו"ל - זה משנה?) תודה רבה! להלן הקוד -
שלום חברים קראתי את המאמר http://www.webmaster.org.il/article.asp?id=189 אבל יש לי רק הצלחה חלקית - שורת הנושא נופיעה בעברית (שזה כבר התקדמות), אבל התוכן לא - ורק אחרי שאני משנה באימייל שהתקבל ל-ENCODING בעברית, רק אז זה מוצג כראוי. השאלה איך זה יכול להיות טוב גם בלי השינוי הידני אצל הנמען. (אגב - השרת נמצא בחו"ל - זה משנה?) תודה רבה! להלן הקוד -
Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailserver ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/usemessageresponsetext ") = True ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="XXXXXX" ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="XXXXX" ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = strSendTo & "<" & strSendToEmail & ">" ObjSendMail.Bcc = StrBCC 'response.Write strBCC ObjSendMail.Subject = (strSubject) ObjSendMail.From = "XXXXXX <[email protected]>" ObjSendMail.ReplyTo = strReplyTo strMailHeader = "<div style=""text-align: center; background-color: #F1F1F1; padding: 3px;"">" strMailfooter = "</div>" strEmailBody = strMailHeader & strEmailBody & strMailfooter 'response.Write(strEmailBody) ' we are sending a text email.. simply switch the comments around to send an html email instead ' ObjSendMail.HTMLBody = "<html><head><title>Message</title><meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1255"" /></head><body>" & strEmailBody &"</body></html>" 'ObjSendMail.TextBody = strEmailBody ObjSendMail.BodyPart.Charset = "windows-1255" ObjSendMail.HTMLBodyPart.Charset = "Windows-1255" ObjSendMail.Send Set ObjSendMail = Nothing
תודה רבה!