Click here to Skip to main content
15,888,968 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can anybody please help me Pin
Christian Graus12-Jul-09 7:39
protectorChristian Graus12-Jul-09 7:39 
GeneralRe: Can anybody please help me Pin
Not Active12-Jul-09 7:38
mentorNot Active12-Jul-09 7:38 
GeneralRe: Can anybody please help me Pin
#realJSOP13-Jul-09 1:08
mve#realJSOP13-Jul-09 1:08 
GeneralRe: Can anybody please help me Pin
Not Active13-Jul-09 2:01
mentorNot Active13-Jul-09 2:01 
QuestionBitmap region is already locked. Pin
livewirerules12-Jul-09 1:05
livewirerules12-Jul-09 1:05 
AnswerRe: Bitmap region is already locked. Pin
Eslam Afifi12-Jul-09 4:11
Eslam Afifi12-Jul-09 4:11 
AnswerRe: Bitmap region is already locked. Pin
JimmyRopes12-Jul-09 6:57
professionalJimmyRopes12-Jul-09 6:57 
QuestionSend EMail with zip file/rar file Pin
shai sherman12-Jul-09 0:21
shai sherman12-Jul-09 0:21 
how can i send an email with an Attachments of zip/rar file?

I write this code :
<code>System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();

System.Net.NetworkCredential cred = new System.Net.NetworkCredential("username@gmail.com", "password");

mail.To.Add("username@gmail.com");
mail.Subject = "Subject";
mail.From = new System.Net.Mail.MailAddress("username@gmail.com");
mail.IsBodyHtml = true;
mail.Body = filename;
mail.Attachments.Add(new Attachment(@"c:\1.zip",MediaTypeNames.Application.Zip));
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Port = 587;
smtp.Timeout = 1000000;
smtp.Send(mail);</code>


The size of the file "1.zip" is 500kb and i get this message:
{"Exceeded storage allocation. The server response was: 5.7.0 Our system detected an illegal attachment on your message. Please"}


Can someone please help to solve this issue?
AnswerRe: Send EMail with zip file/rar file Pin
OriginalGriff12-Jul-09 0:48
mveOriginalGriff12-Jul-09 0:48 
GeneralRe: Send EMail with zip file/rar file Pin
shai sherman12-Jul-09 1:21
shai sherman12-Jul-09 1:21 
GeneralRe: Send EMail with zip file/rar file Pin
musefan12-Jul-09 1:32
musefan12-Jul-09 1:32 
GeneralRe: Send EMail with zip file/rar file Pin
EliottA12-Jul-09 3:39
EliottA12-Jul-09 3:39 
GeneralRe: Send EMail with zip file/rar file Pin
musefan12-Jul-09 3:41
musefan12-Jul-09 3:41 
GeneralRe: Send EMail with zip file/rar file Pin
Luc Pattyn12-Jul-09 5:11
sitebuilderLuc Pattyn12-Jul-09 5:11 
GeneralRe: Send EMail with zip file/rar file Pin
OriginalGriff12-Jul-09 2:59
mveOriginalGriff12-Jul-09 2:59 
GeneralRe: Send EMail with zip file/rar file Pin
EliottA12-Jul-09 3:55
EliottA12-Jul-09 3:55 
GeneralRe: Send EMail with zip file/rar file Pin
OriginalGriff12-Jul-09 4:00
mveOriginalGriff12-Jul-09 4:00 
GeneralRe: Send EMail with zip file/rar file Pin
EliottA12-Jul-09 3:38
EliottA12-Jul-09 3:38 
AnswerRe: Send EMail with zip file/rar file Pin
sandeshmms13-Jul-10 22:17
sandeshmms13-Jul-10 22:17 
AnswerRe: Send EMail with zip file/rar file Pin
Jimut Baran19-Nov-12 2:37
Jimut Baran19-Nov-12 2:37 
QuestionApplication Updates Pin
Baeltazor11-Jul-09 23:59
Baeltazor11-Jul-09 23:59 
AnswerRe: Application Updates Pin
EliottA12-Jul-09 3:40
EliottA12-Jul-09 3:40 
AnswerRe: Application Updates Pin
Not Active12-Jul-09 4:20
mentorNot Active12-Jul-09 4:20 
GeneralRe: Application Updates Pin
Baeltazor12-Jul-09 8:37
Baeltazor12-Jul-09 8:37 
Question[Urgent] How to detect a timezone observes DST time or not ( .Net Framework 2.0) Pin
senorAli3311-Jul-09 23:29
senorAli3311-Jul-09 23:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.