Article View: comp.lang.basic.visual
Article #131Re: Email
From: David Whitman
Date: Mon, 04 Dec 2000 00:00
Date: Mon, 04 Dec 2000 00:00
38 lines
2768 bytes
2768 bytes
On Fri, 01 Dec 2000 12:29:27 GMT, "naylors" <naylors@optushome.com.au>
wrote:
>Hi I am making a program that I want to incorporate an email button so the
>user if he/she has the net can email me with any questions or comments. How
>do I make suck a button or something to click on to mail me?
>Thanks
Using SocketTools, you can accomplish the same sort of thing
(without some of the limitations; for example, the body of
your message isn't limited to 255 characters). The code to do
this would look something like this:
MailMessage1.From = "youremail@domain.com"
MailMessage1.To = "dacuna@timeco.com"
MailMessage1.Subject = "test"
MailMessage1.Text = "This is a test message"
MailMessage1.AttachFile "c:\danny\mcfa.csv"
MailMessage1.ExportFile ""
SmtpClient1.Extended = True
SmtpClient1.HostName = "mail.hypercon.com"
SmtpClient1.Domain = "domain.com"
SmtpClient1.UserName = "dacuna"
SmtpClient1.Password = "gaucho"
SmtpClient1.Connect
SmtpClient1.SendMessage "youremail@domain.com",
"dacuna@timeco.com", ""
SmtpClient1.Disconnect
In this case, the UserName and Password are only needed if your SMTP
server requires authentication. You'd also obviously want to add
error checking (and perhaps write some code for the Progress event
in the SMTP control so that you can give the user some feedback). If
you're interested, you can download a free evaluation copy of
SocketTools from our website at http://www.catalyst.com/
David
Technical Details
Message-ID:
<u1mn2tch3r7jq33dhai1sfmroq3edn91ef@4ax.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<HQMV5.6532$BU4.12109@news1.blktn1.nsw.optushome.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107824,86feea20da8671b8 X-Google-Attributes: gid107824,public X-Google-Thread: 110e3b,86feea20da8671b8 X-Google-Attributes: gid110e3b,public X-Google-Thread: 105c2e,86feea20da8671b8 X-Google-Attributes: gid105c2e,public X-Google-Thread: 108062,86feea20da8671b8 X-Google-Attributes: gid108062,public X-Google-Thread: 10b997,86feea20da8671b8 X-Google-Attributes: gid10b997,public X-Google-Thread: f645d,86feea20da8671b8 X-Google-Attributes: gidf645d,public From: David Whitman <david@catalyst.com> Subject: Re: Email Date: 2000/12/04 Message-ID: <u1mn2tch3r7jq33dhai1sfmroq3edn91ef@4ax.com> X-Deja-AN: 701043809 Content-Transfer-Encoding: 7bit References: <HQMV5.6532$BU4.12109@news1.blktn1.nsw.optushome.com.au> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 975955370 38.29.80.234 (Mon, 04 Dec 2000 10:42:50 PST) Organization: Catalyst Development Corp. MIME-Version: 1.0 NNTP-Posting-Date: Mon, 04 Dec 2000 10:42:50 PST Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.misc,cz.comp.lang.basic.visual,fj.comp.lang.visualbasic,fj.lang.visualbasic,it.comp.lang.visual-basic