Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Communications > Email Contents of TextBox on timer


Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2002, 10:47 AM
KicKs
Guest
 
Posts: n/a
Default Email Contents of TextBox on timer


I'm trying to email the contents of the textbox every ten minutes. I'm having some trouble on how to do the emailer, any help will be apprieciated.
Reply With Quote
  #2  
Old 02-02-2002, 12:12 PM
orufet's Avatar
orufet orufet is offline
Paranoid Coder

Retired Leader
 
Join Date: Mar 2001
Location: Canada
Posts: 2,716
Default

There is a tutorial in the Tutors Corner by Cheif (I think) that explains how to use Telnet and Winsock to send an e-mail. It's quite simple.
Reply With Quote
  #3  
Old 02-02-2002, 12:15 PM
ChiefRedBull's Avatar
ChiefRedBull ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

You can either use the Outlook object (search the forum) or you can use Winsock and a free public SMTP server like HotMail.

Links: here,here,here..... etc.
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #4  
Old 02-02-2002, 01:42 PM
KicKs
Guest
 
Posts: n/a
Default

You know if your at a website, and you click their mailto:blah@blah.com link, and it opens your default email program, outlook express, or ms outlook, i want it to do that, but I want to make sure it's a default one on their computer, so i want a mailto: link maybe? I'm comfused [I'm not using a timer anymore]

Last edited by KicKs; 02-02-2002 at 01:52 PM.
Reply With Quote
  #5  
Old 02-02-2002, 02:17 PM
pisoftwar pisoftwar is offline
Centurion
 
Join Date: Nov 2001
Location: Trinidad
Posts: 142
Default

Mail to: is part of the ooperating system of windows, it should always open the default mail program.

Try running a shell command with the mail to: line

eg.
in a dos window type mail to:yourself@home.com
and see what happens
__________________
K.I.S. Keep It Simple.
Reply With Quote
  #6  
Old 02-02-2002, 02:22 PM
PWNettle PWNettle is offline
Verbose Coder

Retired Moderator
* Guru *
 
Join Date: Dec 1999
Location: Phoenix, Arizona
Posts: 3,011
Default

You can use the ShellExecute API to cause the default email client application to load with a 'mailto' 'url', for example: 'mailto:someone@somedomain.com'.

ShellExecute has been discussed many times and I did a tutorial on it in Tutor's Corner a long time ago (including a mailto example).

Paul
Reply With Quote
  #7  
Old 02-02-2002, 03:22 PM
KicKs
Guest
 
Posts: n/a
Default

Okay, I have two textboxes. One, has the user's email in it. The other, has information in it. When the second one gets full, I want it to email the contents to the email address in the first textbox. I would imagine it would be similar to something as follows. Please help me alter the code bellow to make it work.

If Len(Text2.Text) > 5000 Then
'Mail Code Here (Maybe Mailto:Text1.Text or something)
End If
Reply With Quote
  #8  
Old 02-02-2002, 03:29 PM
orufet's Avatar
orufet orufet is offline
Paranoid Coder

Retired Leader
 
Join Date: Mar 2001
Location: Canada
Posts: 2,716
Default

*long sigh*

Did you see my post?

http://bbs.visualbasicforum.com/show...406&highlight=

^^That URL will teach you how to send e-mail....^^
Reply With Quote
  #9  
Old 02-02-2002, 03:43 PM
KicKs
Guest
 
Posts: n/a
Default

Is it that complicated? =(
Reply With Quote
  #10  
Old 02-02-2002, 03:48 PM
orufet's Avatar
orufet orufet is offline
Paranoid Coder

Retired Leader
 
Join Date: Mar 2001
Location: Canada
Posts: 2,716
Default

Actually, once you read that tutorial a couple of times, you'll notice that it's quite simple. You just have to understand the concept and what you're doing. You could use an Outlook session, which is much easier, but requires the user have Outlook installed and configured (not very likely).
Reply With Quote
  #11  
Old 02-02-2002, 03:51 PM
KicKs
Guest
 
Posts: n/a
Default

Yeah, that's why I wanted to go with the mailto: default mailer. I don't understand the tutorial..or how to mod it a bit to make it take the email in the textbox, and send it.
Reply With Quote
  #12  
Old 02-03-2002, 08:42 AM
ChiefRedBull's Avatar
ChiefRedBull ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

The concept of sending mail via an SMTP server is more complex than launching the default mail client, but if you just wanted to automate a few mails or perhaps even a batch mail delviery it would be quicker, as it doesn't require any input from the user once its got the initial addresses and mail message etc...

ShellExecuting the default mail client is the simplest way forward I think.... read the several million posts which have been made on the subject recently.....
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #13  
Old 02-06-2002, 04:07 PM
KicKs
Guest
 
Posts: n/a
Default

Hmm..I think instead of emailing the contents when it gets full, I'll have it save it in a notepad somewhere...I don't want the Save As Dialog to pop up, I want it to save where the user specified in the textbox, such as "C:/KKL.txt"
Reply With Quote
  #14  
Old 02-06-2002, 04:34 PM
orufet's Avatar
orufet orufet is offline
Paranoid Coder

Retired Leader
 
Join Date: Mar 2001
Location: Canada
Posts: 2,716
Default

Okay. Thanks for alerting us about your decision.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->