Can I write my program to send emails?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuzz13
    New Member
    • Jun 2010
    • 110

    Can I write my program to send emails?

    I am writing a program that will periodically scan for changes in a file, and if that file changes I need it to send out an email based on the email field that the user fills in.

    My question is, can I have my program send emails automatically based on tests, and if so do I have it done thru an account like myprogram@gmail .com? Is there a way to tell my program how to send an email without some established webmail server like yahoo or gmail?
    If I can't have it access internet protocols and send its own emails without an email address established somewhere is there a domain that interfaces with programs well that I would be able to program with? Like teach my program to send an email thru a gmail account?

    I hope that comes across clear enough. Thanks for the help in advance.
  • Subin Ninan
    New Member
    • Sep 2010
    • 91

    #2
    Yes, you can send emails in c# using SmtpMail class. It requires host address, port, from username, password, to user, subject, message as parameters. You can check host address, port, etc of hotmail, gmail, yahoo, etc using google.

    But in my case, i created a new hotmail account dedicated for this purpose as hardcoded username and passwords in code can be easily decompiled. Also, hotmail used to block my account whenever my program sends an email. It works temporarily,.

    Comment

    Working...