473,386 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Email Application

In order to send automated email from my application I
have used MAPI controls.Unfortunatly I don't know how
to handle the MAPI control Error Messages described here
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/mapi98/html/mapicontrolserrs.asp.

For example if my mail doesn't have any attachment I would
like to trap the error
mapAttachmentNotFound - 32011 - Attchment not found.
In my application I'm handling exception and in this case
the error displayed is "Unspecified failure has occured".

Thanks
Nov 20 '05 #1
3 1129
Why don't you use CDO instead of MAPI

You can also sa

On Error Goto myError ' VB 6

...

myError

select case err.Numbe

Case ' No attachment error number her
' Handle error here (i.e. Resume Next
Case Els
' Handle other errors her
End Selec

If you're using VB.NET the use the Try - Catch - End Try bloc

Nov 20 '05 #2
Olá Cristina

Use System.Web.Mail.SmtpMail its simplier to use.

Kind Regards
Jorge Cavalheiro
-----Original Message-----
In order to send automated email from my application I
have used MAPI controls.Unfortunatly I don't know how
to handle the MAPI control Error Messages described here
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/mapi98/html/mapicontrolserrs.asp.

For example if my mail doesn't have any attachment I would like to trap the error
mapAttachmentNotFound - 32011 - Attchment not found.
In my application I'm handling exception and in this case the error displayed is "Unspecified failure has occured".

Thanks
.

Nov 20 '05 #3
"=?Utf-8?B?SGVscGZ1bA==?=" <an*******@discussions.microsoft.com> wrote in
news:82**********************************@microsof t.com:
Why don't you use CDO instead of MAPI?
CDO isnt installed on all machines and is limited in functionality. If your
not stuck to MAPI, try Indy. Its free:

http://www.indyproject.org/

Basic mail demo in VB at:
http://www.atozed.com/indy/
On Error Goto myError ' VB 6
Ack! Dont use those. Those are old error handling mechanisms and should die.
use try blocks instead.
If you're using VB.NET the use the Try - Catch - End Try block


Yes exactly. :)
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mark Hahn | last post by:
Can someone point me in the right direction to tell windows to run the default email application, create a new message, and let me populate it with subject, body, and attachments? I've been...
2
by: brettk | last post by:
Hello All, Here's what I'm trying to do: I need to connect to a pop3 server, download all messages, and copy all of the attachments into a specific directory. The actual email message is...
117
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
3
by: scott_baird | last post by:
I have an email macro setup (maybe I should go another way, but that was the quickest at the moment...) and what I would like to do is automate the "to" addressee of the email it generates for...
6
by: \jason via DotNetMonster.com\ | last post by:
currently i am doing a personal website and keep on changing the aspect... finally the finall decision is to have a login page (requirement in asp.net, vb.net) and the login with security part of...
1
by: John Smith | last post by:
Hi, I'm trying to send email in our C# ASP.Net application using the Outlook 11 library. For a bunch of unimportant reasons (unimportant to this posting that is) we have to do it this way and...
16
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
5
by: xin.yadong | last post by:
Is there a way to create an New Outlook Email from an ASP.NET application? I can not use "mailto:", since it is only support a string less than 512. I have find a good way from link :...
2
by: bthubbard | last post by:
Hello All, I am hoping to hear other people's suggestions and advice regarding this issue. Generating and sending a basic HTML email with Microsoft.Net is easy. I can throw some HTML together...
12
by: bpw22az | last post by:
Bare with me guys. I will try and make this short and to the point. I have a website that allows students to check their admission status by submitting their email address which in turn sends them...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.