Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2009, 04:53 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default sENDING eMAIL fROM vb6

I have a program with no user interface, which I want to send email.

It runs on a server, being started through Task Scheduler on Reboot.

The entry point is Public Sub Main().

It looks for data files in a folder; if none are found, it Sleeps the thread for 5 seconds, then looks again—lather, rinse, repeat.

When it finds one, it reads it, deletes it, then acts on the read data.

If there is an error, I want to notify the user (one of the piece of data) through email.

________________

<Shoot! Bitten by Caps Lock again!>

I can’t use the MAPI control, because there are no forms to serve as its container...

Last edited by BrianWren; April 8th, 2009 at 04:56 PM.. Reason: Wanted to edit title to proper case.
 
Old April 8th, 2009, 05:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi..

Unless that particular control has any problem (that I doubt) you can instantiate the control from code and use it like it's on a form. Did you try it???
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old April 8th, 2009, 05:12 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

What's the syntax for that?
 
Old April 8th, 2009, 06:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Well.. I add the component to the control toolbar and then I can do

Dim pp As MAPIMessages
Dim aa As MAPISession

Which I supposed it's the same that the control do. Every control can be called by code.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old April 13th, 2009, 10:45 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I got an access denied error adding it to the toolbox. (Grrrrr...)

I have move to a different approach, and am going to start a new thread in VB 6 Pro on that approach; Hope to meet you there.
 
Old May 4th, 2009, 11:40 PM
Authorized User
 
Join Date: Apr 2008
Posts: 54
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by BrianWren View Post
I got an access denied error adding it to the toolbox. (Grrrrr...)

I have move to a different approach, and am going to start a new thread in VB 6 Pro on that approach; Hope to meet you there.
Hi you can do it easily with CDO. You can refer here

http://www.vbknowledgebase.com/WebAp...-VB6-using-CDO


if you are unable to send using the above, please let me know

thanks
__________________
Pon Saravanan
VbKnowledgebase.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending EMAIL charleshua BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 16 September 3rd, 2008 12:27 AM
Sending email ironchef Pro JSP 3 February 17th, 2008 11:38 PM
Need Help in sending email khalidj06 Forum and Wrox.com Feedback 6 April 14th, 2006 08:16 AM
sending email keyvanjan Classic ASP Components 1 May 9th, 2005 05:56 PM
Sending Email soccers_guy10 Pro VB 6 3 February 11th, 2004 10:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.