On Thu, Dec 5, 2013 at 9:48 AM, MB Software Solutions General Account <
[email protected]> wrote:

> On Wed, December 4, 2013 4:20 pm, Frank Cazabon wrote:
> > I use blat in vfp, but in this case it is a c# .net project
>
>
> Can BLAT be used from C#?
> -------------------


No need to.  Have done similar to this before.

using System.Net.Mail;

var fromAddress = new MailAddress("[email protected]", "From Name");var
toAddress = new MailAddress("[email protected]", "To Name");const string
fromPassword = "fromPassword";const string subject = "Subject";const
string body = "Body";var smtp = new SmtpClient      {
   Host = "smtp.gmail.com",
     Port = 587,
      EnableSsl = true,
     DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
        Credentials = new NetworkCredential(fromAddress.Address,
fromPassword)      };using (var message = new MailMessage(fromAddress,
toAddress)
      {             Subject = subject,             Body = body           })
{  smtp.Send(message);}




-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMYJo6KxLSYj_7=3oe+sgf6wcar5mzykuqejztxjpy7u...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to