Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Subs.php on line 3825
CDO email and 'System_using' error

Author Topic: CDO email and 'System_using' error  (Read 3965 times)

0 Members and 1 Guest are viewing this topic.

Offline Bob Mechler

  • Newbie
  • *
  • Posts: 3
  • User-Rate: +1/-2
CDO email and 'System_using' error
« on: November 24, 2009, 09:33:43 PM »
The following code comes from w3schools.com in the ASP example section.
Code: [Select]
<%
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


« Last Edit: November 24, 2009, 09:38:29 PM by Bob Mechler »

Offline Bob Mechler

  • Newbie
  • *
  • Posts: 3
  • User-Rate: +1/-2
Re: CDO email and 'System_using' error
« Reply #1 on: November 24, 2009, 10:16:48 PM »
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

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2487
  • User-Rate: +204/-0
Re: CDO email and 'System_using' error
« Reply #2 on: November 25, 2009, 12:30:37 AM »
 
Let's see if somebody is using ASP and Outlook 2007. Maybe Edwin, but I think that he is on holidays.

Offline Bob Mechler

  • Newbie
  • *
  • Posts: 3
  • User-Rate: +1/-2
Re: CDO email and 'System_using' error
« Reply #3 on: November 25, 2009, 03:29:13 PM »
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

Offline Gérôme Guillemin

  • Newbie
  • *
  • Posts: 12
  • User-Rate: +0/-6
Re: CDO email and 'System_using' error
« Reply #4 on: December 02, 2009, 11:01:38 AM »
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