|
-
Mar 17th, 2000, 02:01 AM
#1
Thread Starter
Lively Member
I am trying to send an email using MAPI and everything works fine until i send it then i get the following error message in my outlook
No transport provider was available for delivery to this recipient.
here is the code:
Dim x As String
Dim y As String
x = rtfCopylstReport.Text
y = InputBox("Please enter an email address.", "EmailAddress")
MAPISession1.SignOn
MAPIMessages1.SessionID = Me.MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.MsgSubject = "Search Results"
MAPIMessages1.MsgNoteText = x
MAPIMessages1.RecipAddress = y
MAPIMessages1.RecipDisplayName = MAPIMessages1.RecipAddress
MAPIMessages1.Send True
MAPISession1.SignOff
What am i doing wrong?
Thanks,
Cady
-
Mar 17th, 2000, 04:18 AM
#2
Thread Starter
Lively Member
never mind, i figured it out!!!!
thanks anyway.
Cady
-
May 23rd, 2000, 03:17 PM
#3
Hyperactive Member
Hi cady,
I hit the same problem when using email code similar to you. Would you tell me how you solved it ?
Thanks
KM Chong
-
May 23rd, 2000, 10:04 PM
#4
Thread Starter
Lively Member
Here you go kmchong, on this example i have x=rtfcopylstreport.text because i wanted to automatically put the email contents in, all the user had to do was enter an email address in the input box which was then automatically added to the email, then hit send. I did put some information in the ErrorHandler that allowed for errors but this works great.
Dim x As String
Dim y As String
x = rtfCopylstReport.Text
y = InputBox("Please enter an email address.", "Email Address")
On Error GoTo ErrorHandler
MAPISession1.SignOn
MAPIMessages1.SessionID = Me.MAPISession1.SessionID
MAPIMessages1.MsgIndex = -1
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = y
MAPIMessages1.MsgSubject = "search results"
MAPIMessages1.MsgNoteText = x
MAPIMessages1.ResolveName
MAPIMessages1.Send True
MAPISession1.SignOff
Let me know if this doesn't make sense, or doesn't help.
Cady
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|