MAPI Controls 
Author Message
 MAPI Controls

When I use the MAPI Controls to send emails I got an error '32002' :
'Unspecified Failure has occured'

I have VB 6 SP3, Outlook 2000 and Outlook Express which has the account I
want to use for the mail delivery of mails sended  in the VB app.
I did it a year ago with Outlook Express 4 and VFP and had no problems !
I use following code:

  'SingOn
  mSession.SignOn
  mMsg.SessionID = mSession.SessionID

  'Compose msg
  mMsg.Compose

  'Address msg

  'Create msg
  mMsg.MsgSubject = "CompuGuide Email Check"
  mMsg.MsgNoteText = ""
  mMsg.MsgNoteText = mMsg.MsgNoteText & "Geachte," & cLF & cLF
  mMsg.MsgNoteText = mMsg.MsgNoteText & "het e-mailadres

  mMsg.MsgNoteText = mMsg.MsgNoteText & "'CompuGuide? - The Belgian Business
Guide'." & cLF & "Indien u wenst dat dit emailadres uit de databank wordt
verwijdered, gelieve op deze email te antwoorden met de mededeling."

  mMsg.Send False

  mSession.SignOff

Anyone knows what I'm doing wrong ?



Sun, 24 Feb 2002 03:00:00 GMT  
 MAPI Controls

Error is generated because it in not allowed to initialise with a NULL!
   mMsg.MsgNoteText = ""



Quote:
> When I use the MAPI Controls to send emails I got an error '32002' :
> 'Unspecified Failure has occured'

> I have VB 6 SP3, Outlook 2000 and Outlook Express which has the
account I
> want to use for the mail delivery of mails sended  in the VB app.
> I did it a year ago with Outlook Express 4 and VFP and had no
problems !
> I use following code:

>   'SingOn
>   mSession.SignOn
>   mMsg.SessionID = mSession.SessionID

>   'Compose msg
>   mMsg.Compose

>   'Address msg

>   'Create msg
>   mMsg.MsgSubject = "CompuGuide Email Check"
>   mMsg.MsgNoteText = ""
>   mMsg.MsgNoteText = mMsg.MsgNoteText & "Geachte," & cLF & cLF
>   mMsg.MsgNoteText = mMsg.MsgNoteText & "het e-mailadres

>   mMsg.MsgNoteText = mMsg.MsgNoteText & "'CompuGuide? - The Belgian
Business
> Guide'." & cLF & "Indien u wenst dat dit emailadres uit de databank
wordt
> verwijdered, gelieve op deze email te antwoorden met de mededeling."
>   mMsg.MsgNoteText = mMsg.MsgNoteText & "UNSUBSCRIBE


Quote:

>   mMsg.Send False

>   mSession.SignOff

> Anyone knows what I'm doing wrong ?

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Sun, 24 Feb 2002 03:00:00 GMT  
 MAPI Controls
I changed it, but I still get te same error

I remember in OE4 I has set a setting of 'SIMPLE MAPI ...', I cannot find it
in OE5, maybe this is the problem however I can sign on ??
Are there any other ways to send automated emails in VB ?

Pete



Quote:

> Error is generated because it in not allowed to initialise with a NULL!
>    mMsg.MsgNoteText = ""



Mon, 25 Feb 2002 03:00:00 GMT  
 MAPI Controls
As a test try  mMsg.MsgNoteText = "  " It worked for me in VB6! In article


has set a setting of 'SIMPLE MAPI ...', I cannot find it > in OE5, maybe this
is the problem however I can sign on ?? > Are there any other ways to send


Error is generated because it in not allowed to initialise with a NULL! > >
mMsg.MsgNoteText = "" > >

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 25 Feb 2002 03:00:00 GMT  
 MAPI Controls
I have tested this and it works with the following code.
Note:  I used my email address and Changed cLF to vbLF
This code will send an email to my address. It does not use an
addressbook.

'SingOn
  mSession.Username="enter a vaild profile for email use"
  mSession.DownLoadmail=False ' skip retrieving/sending new/pending
messages
  mSession.SignOn
  mSession.NewSession=True
  mMsg.SessionID = mSession.SessionID

  'Compose msg

  mMsg.Compose

  'Address msg

  'Create msg
  mMsg.MsgSubject = "CompuGuide Email Check"
  mMsg.MsgNoteText = " "
  mMsg.MsgNoteText = mMsg.MsgNoteText & "Geachte," & vbLF & vbLF
mMsg.MsgNoteText = mMsg.MsgNoteText & "het e-mailadres

  mMsg.MsgNoteText = mMsg.MsgNoteText & "'CompuGuide? - The Belgian
Business Guide'." & vbLF & "Indien u wenst dat dit emailadres uit de
databank wordt verwijdered, gelieve op deze email te antwoorden met de
mededeling."   mMsg.MsgNoteText = mMsg.MsgNoteText & "UNSUBSCRIBE

   'Creates message and places it in OUTBOX

  mMsg.Send False

   ' connect to provider

  mSession.DownloadMail=True

  mSession.SignOff



Quote:
> When I use the MAPI Controls to send emails I got an error '32002' :
> 'Unspecified Failure has occured'

> I have VB 6 SP3, Outlook 2000 and Outlook Express which has the
account I
> want to use for the mail delivery of mails sended  in the VB app.
> I did it a year ago with Outlook Express 4 and VFP and had no
problems !
> I use following code:

>   'SingOn
>   mSession.SignOn
>   mMsg.SessionID = mSession.SessionID

>   'Compose msg
>   mMsg.Compose

>   'Address msg

>   'Create msg
>   mMsg.MsgSubject = "CompuGuide Email Check"
>   mMsg.MsgNoteText = ""
>   mMsg.MsgNoteText = mMsg.MsgNoteText & "Geachte," & cLF & cLF
>   mMsg.MsgNoteText = mMsg.MsgNoteText & "het e-mailadres

>   mMsg.MsgNoteText = mMsg.MsgNoteText & "'CompuGuide? - The Belgian
Business
> Guide'." & cLF & "Indien u wenst dat dit emailadres uit de databank
wordt
> verwijdered, gelieve op deze email te antwoorden met de mededeling."
>   mMsg.MsgNoteText = mMsg.MsgNoteText & "UNSUBSCRIBE


Quote:

>   mMsg.Send False

>   mSession.SignOff

> Anyone knows what I'm doing wrong ?

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Tue, 26 Feb 2002 03:00:00 GMT  
 MAPI Controls
Yep, it works,

many, many thanks to Rick !!

Pete



Tue, 26 Feb 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. MAPI functionality without the MAPI controls on a form

2. VB, MAPI, and Outlook Express: Microsoft MAPI Control 6.0

3. MAPI Controls

4. Using the vb MAPI control to unmark messages as read

5. Mapi Control Work with outlook 97?

6. Help on MAPI Control !?

7. MAPI Controls

8. Changing E-Mail Header With VB5 MAPI Controls

9. Help MAPI Control Error 32003

10. VB6 MAPI controls and MS Mail

11. MAPI Controls

12. Help with MAPI controls

 

 
Powered by phpBB® Forum Software