• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

CDO email and 'System_using' error

Started by Bob Mechler, November 24, 2009, 09:33:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bob Mechler

The following code comes from w3schools.com in the ASP example section.

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.AddAttachment "c:\mydocuments\test.txt"
myMail.Send
set myMail=nothing
%>


saved as sendcdoemail.asp and entered as a URL in IE7 or Mozilla.

This code works fine up through 2003 Outlook allowing one to send multiple emails without Outlook even installed or without it's objection while logged in with a valid windows login that has a valid email account.

On 2007 Outlook though, it errors out saying there is an invalid 'SendUsing' configuration value is invalid. Looking further it seems it needs something like the following added to code above to work.

'SmtpMail.SmtpServer = "myserver"

Any help would be appreciated.

Bob Mechler



Bob Mechler

Additional info.

It seems to work with Outlook 2003 and those computers happen to have local domain authenticated smtp setup in IIS6 while the outlook 2007 computers don't.

From other reading that may be the problem with needing authentication to relay the email through exchange if there is no authenticated local smtp.

Bob Mechler

José Roca

 
Let's see if somebody is using ASP and Outlook 2007. Maybe Edwin, but I think that he is on holidays.

Bob Mechler

One common thing stood out. The computers that worked had IIS installed with a local smtp server. The others were non-programmers and IIS and SMTP weren't installed at all. This forced (I think) the code to seek the Exchange servers permission to relay the message out. I found some interesting stuff on Experts-Exchange which I don't understand enough to implement except that it involves getting the IP address or client alias of the Exchange server plus several configuration items as well as user name and password.

Oh, the message was actually 'SendUsing configuration parameter was invalid'.

I need to also review the CDO lib stuff on this site so I can learn more. Many of our customers would be ok with a local smtp server for one supervisor to use to send emails with PDF's attached to clients who have requested them, without Outlook requiring you to click ok on each one.

Bob Mechler

Gérôme Guillemin

Hello,

Or you can use the BLAT.EXE free program shipped with its C++ sources as well :)
A 3rd party has been also written to act like a CGI if you want to use it locally.

See http://www.blat.net/

Yours,
Gerome
http://www.fbsl.net