Date:  10/19/2004 02:12:09 PM Msg ID:  002285
From:  John Kelly Thread:  002278
Subject:  Re: Email Support

It's working now. I don't get it. It must feel better today. Sorry. BTW, here's my code. We still use html_out. I can't afford to rewrite 600+ programs.

PARAMETER RECIPLIST,SENDERADD,SENDERNAME,MSUBJ,;
        MBODY,MATTACH,MCC,MBCC
IF PARAMETERS() < 8
   MBCC=""
ENDIF  
IF PARAMETERS() < 7
   MCC=""
ENDIF  
IF PARAMETERS() < 6
   MATTACH=""
ENDIF
IF FILE(MBODY)
   MBODY=FILETOSTR(MBODY)
ENDIF  

MYSMARTMAIL =CREATEOBJECT("aspSmartMail.SmartMail")

*SMTP Mail Server
MYSMARTMAIL.SERVER = "mail.spectrumdata.com"
MYSMARTMAIL.ORGANIZATION="Spectrum Data Mgmt., Inc."
MYSMARTMAIL.XMAILER="Spectrum Email"
MYSMARTMAIL.XHEADERS.ADD("X-SPECTRUM","Spectrum Email")

MYSMARTMAIL.DATETIME=DATETIME()

MYSMARTMAIL.CONFIRMREAD=.F.
MYSMARTMAIL.RETURNRECEIPT=.F.

IF "<HTML" $ UPPER(MBODY)
   MYSMARTMAIL.CONTENTTYPE="text/html"
ELSE
   MYSMARTMAIL.CONTENTTYPE="text/plain"
ENDIF  

MYSMARTMAIL.SENDERNAME = SENDERNAME
MYSMARTMAIL.SENDERADDRESS = SENDERADD

FOR I=1 TO OCCURS(";",RECIPLIST)+1
   THISRECIP=BRKCOMMA(RECIPLIST,I,";")
   THISADDR=BRKCOMMA(THISRECIP,1,",")
   THISNAME=BRKCOMMA(THISRECIP,2,",")
   MYSMARTMAIL.RECIPIENTS.ADD(THISADDR, THISNAME)
ENDFOR

IF !EMPTY(MCC)
   *MYSMARTMAIL.CCS.ADD("sales@spectrumdata.com","Sales")
   * FUTURE. BREAK UP LIKE RECIPLIST
ENDIF  

*BCC
IF !EMPTY(MBCC)
   *MYSMARTMAIL.BCCS.ADD("sales@spectrumdata.com","Sales")
   * FUTURE. BREAK UP LIKE RECIPLIST
ENDIF  


*REPLYTOS
MYSMARTMAIL.REPLYTOS.ADD(SENDERADD,SENDERNAME)

* ATTACHMENTS
IF !EMPTY(MATTACH)
   FOR I=1 TO OCCURS(";",MATTACH)+1
      THISATTACH=BRKCOMMA(MATTACH,I,";")
      MYSMARTMAIL.ATTACHMENTS.ADD(THISATTACH)
   ENDFOR
ENDIF  

*Message
MYSMARTMAIL.SUBJECT = MSUBJ
MYSMARTMAIL.BODY = MBODY

* Capture send errors
SENDFAILED = .F.
OLDERR = ON("ERROR")
ON ERROR SENDFAILED = .T.

*Send the message
MYSMARTMAIL.SENDMAIL

* Reset error handler
ON ERROR &OLDERR
IF SENDFAILED
   HTML_OUT=HTML_OUT+'<BR>Failed to send e-mail.  ' + ;
          'The error message was:<br>' + MESSAGE()+'<BR>'
   RETURN .F.
ENDIF
RETURN .T.

 

Sent by FoxWeb Support on 10/18/2004 04:47:50 PM:
- Are you getting the exact same error message as Robert (Error 50: The SMTP Server is not ready for Data)?
- What OS is FoxWeb running on?
- What does your script look like?  I recommend using SmartMail1.fwx in the examples folder while you are troubleshooting this issue.  Keep in mind that you will need to change the address of the SMTP server, as well as the from and to email addresses.
- Does your SMTP server require authentication?  If yes, make sure to specify the userid and password in your script.
- Have you tried sending email from a conventional email client, running on your web server and using the same SMTP server?

FoxWeb Support Team
support@foxweb.com email
Sent by John Kelly on 10/18/2004 02:47:34 PM:
I'm getting the same thing. Since my Foxweb and Mail Server are on the same machine, it's unlikely it's a connection issue. Here's the log. There's no support available at the Advantys. If you solve this, or anyone else does, please let me know. For some reason, my client's eager to get the newer Foxweb.

Thanks,
John
Log Below


10/18/2004 4:45:15 PM - {  7173} START SMTP
10/18/2004 4:45:15 PM - Requested SMTP connection from 192.168.42.30 [192.168.42.30], ID=7173
10/18/2004 4:45:15 PM - (  7173) 220 mail.spectrumdata.com ArGoSoft Mail Server Pro for WinNT/2000/XP, Version 1.8 (1.8.6.0)
10/18/2004 4:45:15 PM - (  7173) EHLO 192.168.42.25
10/18/2004 4:45:15 PM - (  7173) 250-Welcome, 192.168.42.30 [192.168.42.30], pleased to meet you
10/18/2004 4:45:15 PM - (  7173) 250-AUTH=LOGIN
10/18/2004 4:45:15 PM - (  7173) 250-AUTH LOGIN
10/18/2004 4:45:15 PM - (  7173) 250-SIZE 5242880
10/18/2004 4:45:15 PM - (  7173) 250-ETRN
10/18/2004 4:45:15 PM - (  7173) Error: [10053] Software caused connection abort
10/18/2004 4:45:15 PM - SMTP connection with 192.168.42.30 [192.168.42.30] ended. ID=7173
10/18/2004 4:45:15 PM - {  7173} END SMTP
Sent by Robert Thomas on 10/16/2004 11:41:10 AM:
This is what I get when we run the mail example

OLE IDispatch exception code 0 from aspSmartMail.SendMail : Error 50: The SMTP Server is not ready for Data

I have tried it on 2 servers and it appears to open the connection then immediately close ..