Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 2958 When Creating Email "To" Option

Status
Not open for further replies.

aregan1

Programmer
Feb 12, 2002
46
US
Hi everyone -

I'm working with Access 2000 and Netscape Communicator 4.77 as my email tool.

I was trying to generate an email message using SendObject, and I was occasionally getting the following error:

Error # 2958 , Description: "Reserved Error"

Through a lot of trial and error, I realized that the error is being caused by what I put into the email address field.

If the string in the "To" field is 3 characters or less (any combination of letters, numbers, spaces or special characters), the email is created okay. However...

If the string in the "To" field is 4 characters or more (again, any combination of characters), I get the #2958 error, and the email is not generated.

My code is as follows:


If IsNull([Forms]![event builder]![contact person].Column(2)) Then
strEmail = " "
Else
' strEmail = [Forms]![event builder]![contact person].Column(2)
strEmail = "a@bc" 'for testing purposes
End If

DoCmd.SendObject , , acFormatHTML, strEmail, , , "Media Services Confirmation", strMessage, True
_______________________________________________

The "not null" situation is the one causing a problem. As you can see by my commented code, I want to pull the email address from a form. But if the length of the address is more than 3 characters (which of course they all are, if they exist), I get the error.

Can anyone tell me why I'm getting this? Could it have something to do with the fact that we use Netscape here instead of Outlook (which I can see most of the people in this forum use)?

By the way, I have to use an outputformat of acFormatHTML, due to a problem I was having with carriage control characters in the email message (see thread705-389549). I still get the same error if I change the outputformat to either acFormatTXT or acFormatRTF.

Thanks for any help you can offer...

- Anita
 

So it looks like this is a known problem with Access 2000! Since we don't use Outlook where I work, is any other option available to me if I want to send an email from Access 2000? I don't know of any other way than SendObject, and the posts I see in this forum seem to offer alternatives only if you're running Outlook...

- Anita
 
I don't have netscape installed here, so i have no way of testing any thing for you...

Go into an access module and see if you can reference netscape... if so you might be able to control it from access...

other wise, i know there was a post(I've asked the same thing) that gives information about access speaking directly to the mail server...

ahh, here it is... look near the bottom of this post for some links on access speaking directly to the mail server...


--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top