|
|
email created with VB won't send
I have an application, written in VB6, that attempts to use MAPI to send an
email (BCC) to a small number (typically 30-40) recipients. Here is the code:
MAPISession.DownLoadMail = False
MAPISession.SignOn
MAPIMessages.SessionID = MAPISession.SessionID
MAPIMessages.Compose
MAPIMessages.MsgSubject = Subject
MAPIMessages.MsgType = "SMTP"
MAPIMessages.MsgNoteText = .tbIntro.Text & Paragraph & MessageText
For Each strAddress In .Addresses
MAPIMessages.RecipIndex = MAPIMessages.RecipCount
MAPIMessages.RecipType = mapBccList
MAPIMessages.RecipAddress = strAddress
MAPIMessages.RecipDisplayName = strAddress
Next strAddress
MAPIMessages.Send True
MAPISession.SignOff
On the face of it, this seems to work. The email appears in Outlook's out
box. The problem is Outlook won't send it. If I click Send/Receive in Outlook
(2003), all the other mail items get sent but the one created by my VB app
just sits there.
If I create a new email in Outlook, copy and paste the text, subject and
recipients from the "stuck" mail into the new one, the new one gets sent OK
so clearly there's nothing wrong with the recipient list itself but there's
something subtly wrong with the email I created. Have I missed something? Any
suggestions what might be wrong with my email causing Outlook to refuse to
send it?
--
Regards
Keith
|
|
0
|
|
|
|
Reply
|
Utf
|
3/24/2010 5:05:02 PM |
|
That looks like CDOSys or CDOEX or some other API (not the Outlook related
CDO 1.21). There's almost no expertise in that here. My suggestion would be
to use the Outlook object model and do things right so Outlook gets a
properly formatted message.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Keith" <Keith@discussions.microsoft.com> wrote in message
news:4BEE48B1-FF6E-43B2-B68B-8FF14B88D94E@microsoft.com...
>I have an application, written in VB6, that attempts to use MAPI to send an
> email (BCC) to a small number (typically 30-40) recipients. Here is the
> code:
> MAPISession.DownLoadMail = False
> MAPISession.SignOn
>
> MAPIMessages.SessionID = MAPISession.SessionID
>
> MAPIMessages.Compose
> MAPIMessages.MsgSubject = Subject
> MAPIMessages.MsgType = "SMTP"
> MAPIMessages.MsgNoteText = .tbIntro.Text & Paragraph &
> MessageText
>
> For Each strAddress In .Addresses
> MAPIMessages.RecipIndex = MAPIMessages.RecipCount
> MAPIMessages.RecipType = mapBccList
> MAPIMessages.RecipAddress = strAddress
> MAPIMessages.RecipDisplayName = strAddress
> Next strAddress
> MAPIMessages.Send True
> MAPISession.SignOff
>
> On the face of it, this seems to work. The email appears in Outlook's out
> box. The problem is Outlook won't send it. If I click Send/Receive in
> Outlook
> (2003), all the other mail items get sent but the one created by my VB app
> just sits there.
>
> If I create a new email in Outlook, copy and paste the text, subject and
> recipients from the "stuck" mail into the new one, the new one gets sent
> OK
> so clearly there's nothing wrong with the recipient list itself but
> there's
> something subtly wrong with the email I created. Have I missed something?
> Any
> suggestions what might be wrong with my email causing Outlook to refuse to
> send it?
> --
> Regards
> Keith
|
|
0
|
|
|
|
Reply
|
Ken
|
3/24/2010 5:19:01 PM
|
|
|
1 Replies
249 Views
(page loaded in 0.145 seconds)
Similiar Articles: email created with VB won't send - microsoft.public.outlook ...I have an application, written in VB6, that attempts to use MAPI to send an email (BCC) to a small number (typically 30-40) recipients. Here is the ... Confirm before sending? - microsoft.public.outlook.general ...I found this reference for VB code but I don't know how to edit ... If the code won't be executed, check the security ... before sending" message, but everytime I send an email ... Outlook won't send meeting requests - microsoft.public.outlook ...email created with VB won't send - microsoft.public.outlook ... Outlook won't send meeting ... Outlook won't send meeting requests - microsoft.public.outlook ... Windows Mail won't send - microsoft.public.windows.vista.mail ...email created with VB won't send - microsoft.public.outlook ... Problem sending BCC's - microsoft.public.windows.live.mail ... It acts weird and won't load the email ... won't send email - microsoft.public.windows.vista.mail ...email created with VB won't send - microsoft.public.outlook ... I have an application, written in VB6, that attempts to use MAPI to send an email (BCC) to a small number ... Can I put a meeting on others calendars with out sending an email ...Outlook won't send meeting requests - microsoft.public.outlook ... Of course, because the calendar ... email created with VB won't send ... When I set up a meeting for one ... error 48389 in mapisession.signon - microsoft.public.vb.general ...Environment is: Windows xp Windows Live Mail Visual Basic V6 ... Team iCode Systems (Replies direct to my email ... Create a new topic Make a reply. Make your own search can't reply or forward mail...must copy into new message to send ...... as long as I create the email but if I reply or > forward emails, they won't send. ... Send copy to active window - microsoft.public.dotnet.languages.vb ... can't reply or ... Can received emails, unable to send/forward. - microsoft.public ...Send and receive works fine as long as I create the email but if I reply or forward emails, they won't send. ... Can received emails, unable to send/forward. - microsoft ... vb.net created msg file witout outlook installed - microsoft ...I just want to store the msg file - not send it T ... server without using Outlook ... installed 'Visual Basic ... Create ... Cannot Complete the Operation - Send email ... VB Send Email [ VB .Net Tutorial ]Looking for a Visual Basic related email sending program for the ... Finally we can call the Send method to send the ... Then the setting won’t work for a while until it ... How to write VB code to send mail - DevX.com ForumsI've created a VB 6.0 class that does a number of interface functions with ... I need to send an HTML formatted email report from an ASP page that points to SQL Server. Messages are stuck in the Outbox - Slipstick SystemsCommon problems and their solution when email is stuck in the Microsoft Outlook Outbox and won't send. ... I created a new profile (for a new job) according to the ... Visual Basic :: Outlook Won't Send Email With Out Being Opened ...Outlook Won't Send Email With Out Being Opened... Here Is My Code. PLEASE ... 2000 you can change the reply email address when sending email - I am trying to create a VB ... Using EMail Objects in Visual Basic - How to Send and Receive ...An About Visual Basic reader asked: How do I use Visual Basic to send and receive email?? ... With the MAPI component, you can create and send a message, include a ... 7/21/2012 5:08:21 PM
|
|
|
|
|
|
|
|
|