 |

02-02-2002, 10:47 AM
|
|
|
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.
|
|

02-02-2002, 12:12 PM
|
 |
Paranoid Coder
Retired Leader
|
|
Join Date: Mar 2001
Location: Canada
Posts: 2,716
|
|
|
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.
|
|

02-02-2002, 12:15 PM
|
 |
ISearchGoogle
Retired Moderator * Expert *
|
|
Join Date: May 2001
Location: england
Posts: 6,321
|
|
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.
|

02-02-2002, 01:42 PM
|
|
|
|
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.
|

02-02-2002, 02:17 PM
|
|
Centurion
|
|
Join Date: Nov 2001
Location: Trinidad
Posts: 142
|
|
|
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.
|

02-02-2002, 02:22 PM
|
|
Verbose Coder
Retired Moderator * Guru *
|
|
Join Date: Dec 1999
Location: Phoenix, Arizona
Posts: 3,011
|
|
|
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
|
|

02-02-2002, 03:22 PM
|
|
|
|
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
|
|

02-02-2002, 03:29 PM
|
 |
Paranoid Coder
Retired Leader
|
|
Join Date: Mar 2001
Location: Canada
Posts: 2,716
|
|
|

02-02-2002, 03:43 PM
|
|
|
|
Is it that complicated? =(
|
|

02-02-2002, 03:48 PM
|
 |
Paranoid Coder
Retired Leader
|
|
Join Date: Mar 2001
Location: Canada
Posts: 2,716
|
|
|
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).
|
|

02-02-2002, 03:51 PM
|
|
|
|
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.
|
|

02-03-2002, 08:42 AM
|
 |
ISearchGoogle
Retired Moderator * Expert *
|
|
Join Date: May 2001
Location: england
Posts: 6,321
|
|
|
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.
|

02-06-2002, 04:07 PM
|
|
|
|
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"
|
|

02-06-2002, 04:34 PM
|
 |
Paranoid Coder
Retired Leader
|
|
Join Date: Mar 2001
Location: Canada
Posts: 2,716
|
|
|
Okay. Thanks for alerting us about your decision.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|