CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008
    Posts
    161

    [RESOLVED] Help with system.net.mail.

    My current application uses gmail to send information specified by the user to my email address.

    I use this code to do this:
    Code:
    System.Net.Mail.MailMessage MyMessage = new System.Net.Mail.MailMessage("Myemailaddress", "SendingEmailAdress", "subject", "body");
    MyMessage.IsBodyHtml = false;
    System.Net.NetworkCredential mailAuthentication = new
    System.Net.NetworkCredential("emailsendinglogin", "emailsendingloginpassword"); // Email used to send email
    System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 25);
    mailClient.EnableSsl = true;
    mailClient.UseDefaultCredentials = false;
    mailClient.Credentials = mailAuthentication;
    mailClient.Send(MyMessage);
    The problem is Gmail keeps thinking that i am "spamming" but i am only sending emails to my email address, and both email address belong to me.
    I am just using one to send it and one to receive. Gmail keeps deleting the account i use to send it.

    Its perfectly legal i assure you, i have a friend who was doing it and it was working fine for him(I assume he was using some other way of sending it through Gmail). I would ask him how to do it, but i have no way of contacting him("Hes in Iraq").

    -Can someone show me a different way of doing this that may work?

    -Show me where to rent a good Smtp server that i could use for this that would work just as well if gmail if there is no fix to this?

    Thanks,

    Pale.

  2. #2
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: Help with system.net.mail.

    There is one way, you can configure your own SMTP server and send the mails across.

  3. #3
    Join Date
    Nov 2006
    Posts
    146

    Re: Help with system.net.mail.

    Quote Originally Posted by Pale
    My current application uses gmail to send information specified by the user to my email address.

    I use this code to do this:
    Code:
    System.Net.Mail.MailMessage MyMessage = new System.Net.Mail.MailMessage("Myemailaddress", "SendingEmailAdress", "subject", "body");
    MyMessage.IsBodyHtml = false;
    System.Net.NetworkCredential mailAuthentication = new
    System.Net.NetworkCredential("emailsendinglogin", "emailsendingloginpassword"); // Email used to send email
    System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 25);
    mailClient.EnableSsl = true;
    mailClient.UseDefaultCredentials = false;
    mailClient.Credentials = mailAuthentication;
    mailClient.Send(MyMessage);
    The problem is Gmail keeps thinking that i am "spamming" but i am only sending emails to my email address, and both email address belong to me.
    I am just using one to send it and one to receive. Gmail keeps deleting the account i use to send it.

    Its perfectly legal i assure you, i have a friend who was doing it and it was working fine for him(I assume he was using some other way of sending it through Gmail). I would ask him how to do it, but i have no way of contacting him("Hes in Iraq").

    -Can someone show me a different way of doing this that may work?

    -Show me where to rent a good Smtp server that i could use for this that would work just as well if gmail if there is no fix to this?

    Thanks,

    Pale.
    At what rate are you sending emails? I have not encountered this problem myself...
    If this post helps you out, please rate it!

  4. #4
    Join Date
    Mar 2008
    Posts
    161

    Re: Help with system.net.mail.

    about 2 an hour all day long, all from different ips.

  5. #5
    Join Date
    Nov 2006
    Posts
    146

    Re: Help with system.net.mail.

    hmm thats weird. probably because of different IP addresses, because if that was the case, anyone using outlook would get their accounts canceled.
    If this post helps you out, please rate it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured