Bad Email Dreams ...
Re: Bad Email Dreams ...
TIm,
Change this line:
If LEN(ALLTRIM(TABMAIL[06])) > 0
:AddAttachment := AllTrim( TABMAIL[06] )
ENDIF
for
If LEN(ALLTRIM(TABMAIL[06])) > 0
:AddAttachment( AllTrim( TABMAIL[06] ) )
ENDIF
Same code works in harbour and xharbour
Regards,
Change this line:
If LEN(ALLTRIM(TABMAIL[06])) > 0
:AddAttachment := AllTrim( TABMAIL[06] )
ENDIF
for
If LEN(ALLTRIM(TABMAIL[06])) > 0
:AddAttachment( AllTrim( TABMAIL[06] ) )
ENDIF
Same code works in harbour and xharbour
Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Re: Bad Email Dreams ...
After making the change, I get error 1, SubC: 1068, OSCode 0 SubSystem BASE Message Argument error
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Re: Bad Email Dreams ...
Tim
Which info do you have in TABMAIL[06] ? if file found ?
Regards,
Which info do you have in TABMAIL[06] ? if file found ?
Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Re: Bad Email Dreams ...
06 refers to the attachements. I tried two tests. The first was to send the name of an existing file in the directory, and it is there. The second was to send a "" value for the file name. Thus The LEN should evaluate to 0 and :AddAttachment should not be called. In both cases I do a messageinfo( ) to display the content and it is correct.
I am sending this as a string. With SMTP we have to pass an array of string values,
Also, this is using Harbour. With xHarbour, the implementation works fine as is. However, I'm trying to complete a move to Harbour and MSVC.
Tim
I am sending this as a string. With SMTP we have to pass an array of string values,
Also, this is using Harbour. With xHarbour, the implementation works fine as is. However, I'm trying to complete a move to Harbour and MSVC.
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Bad Email Dreams ...
Tim,
have you tried FWH\samples\TestMail.prg ? Here it works very fine...
have you tried FWH\samples\TestMail.prg ? Here it works very fine...
Re: Bad Email Dreams ...
Antonio,
As noted earlier in this thread, I previously used FWH SMTP. I had no problems with it, and it still works for me. However we have major issues with ISPs, and so it doesn't work for some of my clients. It does not get a response from the email server. Being able to email documents is very important in my application, so I must have the ability to do attachments.
I can't resolve problems because on my own system there has never been a problem. On the ones where people do have problems, its with our SMTP, but their Outlook, for example, may work just fine with the same settings.
Thats why it gives me "bad dreams"
Tim
As noted earlier in this thread, I previously used FWH SMTP. I had no problems with it, and it still works for me. However we have major issues with ISPs, and so it doesn't work for some of my clients. It does not get a response from the email server. Being able to email documents is very important in my application, so I must have the ability to do attachments.
I can't resolve problems because on my own system there has never been a problem. On the ones where people do have problems, its with our SMTP, but their Outlook, for example, may work just fine with the same settings.
Thats why it gives me "bad dreams"
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Re: Bad Email Dreams ...
Tim i'm using MSVC and no problem, i'm going to compile your code later to find error. do you have an example calling this function ?
Regards
Nicanor
Regards
Nicanor
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Re: Bad Email Dreams ...
Tim,
With xHarbour and Harbour i get errors, i know where is your problem, you are using same parameter for Autentication and SSL, should be logical .T. or .F. i dont know wich type are you using when call function.
And this is modified code tested with Gmail.
Regards,
With xHarbour and Harbour i get errors, i know where is your problem, you are using same parameter for Autentication and SSL, should be logical .T. or .F. i dont know wich type are you using when call function.
Code: Select all
With Object oCfg:Fields
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ):Value := Trim(TABMAIL[01])
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ):Value := TABMAIL[11] // nPort
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusing" ):Value := 2
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ):Value :=[color=#FF0000]TABMAIL[13][/color] // lauth
IF LEN(ALLTRIM(TABMAIL[09])) > 0
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusername" ):Value := Trim( TABMAIL[09] )
:Item("http://schemas.microsoft.com/cdo/configuration/sendpassword" ):Value := Trim( TABMAIL[10] )
ENDIF
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ):Value := [color=#FF0000]TABMAIL[13] // cssl
:Update()
End With
Code: Select all
//-----------------------------------//
FUNCTION SMTPMAILS(TABMAIL)
Local oCfg, oMsg, oError,cToken, ;
nEle := 1, ;
dBcc := SPACE(1000)
DEFAULT Tabmail := { "smtp.gmail.com" ,;
"youremail@gmail.com",;
"your_friend@anyserver.com",;
"Test from Tim Function ",;
"This is a test no answer",;
"c:\jmbbackup\barranquilla.pdf",;
"",;
.t.,;
"youremaail@gmail.com",;
"YourPassWord",;
465,;
"",;
.t.,;
"",;
"" }
/* Tabmail
01 = MAILSERVER
02 = MAILFROM
03 = MAILTO
04 = SUBJECT
05 = BODY
06 = ATTACHMENT
07 = BCC
08 = LAUTHORIZATION
09 = USERID pour MAILSERVER
10 = PW pour MAILSERVER
11 = Mail port defaut = 25
12 = Mail HTML page
13 = ssl authentification
14 = Mail sender
15 = Organisation sender
*/
IF TABMAIL[11] = 0 // PORT
TABMAIL[11] := 25
ENDIF
Try
oCfg := CreateObject( "CDO.Configuration" )
With Object oCfg:Fields
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ):Value := Trim(TABMAIL[01])
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ):Value := TABMAIL[11] // nPort
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusing" ):Value := 2 //
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ):Value := TABMAIL[08] // lauth
IF LEN(ALLTRIM(TABMAIL[09])) > 0
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusername" ):Value := Trim( TABMAIL[09] )
:Item("http://schemas.microsoft.com/cdo/configuration/sendpassword" ):Value := Trim( TABMAIL[10] )
ENDIF
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ):Value := TABMAIL[13] // cssl
:Update()
End With
SYSREFRESH()
oMsg := CreateObject( "CDO.Message" )
With Object oMsg
:Configuration := oCfg
:From := Trim( TABMAIL[02] )
:To := Trim( TABMAIL[03] )
:ReplyTo := TABMAIL[14]
:Subject := Trim( TABMAIL[04] )
:Sender := TABMAIL[14] // Read Receipt message is send to this
:Organization := TABMAIL[15] // "My Company Name"
:TextBody := Trim( TABMAIL[05] )
IF LEN(ALLTRIM(TABMAIL[12])) > 0
:HTMLBody := MEMOREAD(TABMAIL[12])
ENDIF
If LEN(ALLTRIM(TABMAIL[06])) > 0
:AddAttachment( AllTrim( TABMAIL[06] ) ) // := AllTrim( TABMAIL[06] )
ENDIF
If LEN(TABMAIL[07]) > 0
FOR nEle = 1 to LEN(TABMAIL[07])
IF nEle = 1
Dbcc := ALLTRIM(TABMAIL[07][1])
ELSE
DBCC := ALLTRIM(DBCC) + "," + ALLTRIM(TABMAIL[07][nEle])
ENDIF
NEXT
:BCC := Trim(DBCC )
EndIf
:Send()
End With
SysRefresh()
Catch oError
cErrores:= "No se pudo enviar el mensaje" + CRLF + "Error: " + cValToChar( oError:GenCode) + CRLF + ;
"SubC: " + cValToChar( oError:SubCode ) + CRLF + "OSCode: " + cValToChar( oError:OsCode ) + CRLF + ;
"SubSystem: " + cValToChar( oError:SubSystem ) + CRLF + "Mensaje: " + oError:Description +" "+ if( ! Empty( oError:FileName ),;
": " + oError:FileName ,;
if( !Empty( oError:Operation ),;
": " + oError:Operation ,;
"" ) )+CRLF
n := 2 // we don't disscard any info again !
while ( n < 74 )
if ! Empty( ProcName( n ) )
cErrores := CRLF+cErrores+" Called from: " + ProcFile( n ) + " => " + Trim( ProcName( n ) ) + ;
"(" + NTRIM( ProcLine( n ) ) + ")"
endif
n++
end
msginfo( cErrores )
oCfg := Nil
oMsg := Nil
Return( .F. )
End Try
oCfg := Nil
oMsg := Nil
SYSREFRESH()
Return( .T. )
Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Re: Bad Email Dreams ...
I made the changes but can't get a build right now. I'm running into a different problem.
TIm
TIm
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Bad Email Dreams ...
Tim
Did you solve your SMTP e-mail problems .. I was thinking about using CDO, but from the research I have been doing, CDO is not a component loaded on every Windows OS ??
Correct me if I am wrong ?
Thanks
Rick Lipkin
Did you solve your SMTP e-mail problems .. I was thinking about using CDO, but from the research I have been doing, CDO is not a component loaded on every Windows OS ??
Correct me if I am wrong ?
Thanks
Rick Lipkin
Re: Bad Email Dreams ...
I did use the CDO solution and it works here.
Of course the SMTP solution also worked here.
I'm on Win 7 and it has not difficulty in the default install / setup.
Of course the SMTP solution also worked here.
I'm on Win 7 and it has not difficulty in the default install / setup.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Re: Bad Email Dreams ...
I confirm CDO works also in Window 8 beta and last preview Release, tested and working fine.
Regards,
Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
- kokookao2007
- Posts: 59
- Joined: Thu May 17, 2007 8:27 am
Re: Bad Email Dreams ...
hi TimStone :
The 32bit .exe for borland Compiler,
I test a CDO with Attach files solution for WIN7(64bit/32bit).
1) don't double click the .exe file.
2) don't Put .exe file in Current Directory , put it in difference Directory Path
3) Write A batch file and Launch the Batch file(or link file)
---------
#Dump call_exe.bat(in Current Directory)
start .\exe_file\TESTMAIL.EXE
#END DUMP
-----------
I test it work Fine for :
Win7(32bit)+ office 2003+cdo
Win7(32bit)+ office 2007
Win7(32bit)+ office 2010(32bit)
Win7(64bit)+ office 2007(32bit)
Win7(64bit)+ office 2010(32bit)
Win7(64bit)+ office 2010(64bit)
In Win8 you can double click the .exe file and work Fine.
I didn't try FWH64.
--
Best Regards
--------------------------------------------------------------
kokoo KAO
The 32bit .exe for borland Compiler,
I test a CDO with Attach files solution for WIN7(64bit/32bit).
1) don't double click the .exe file.
2) don't Put .exe file in Current Directory , put it in difference Directory Path
3) Write A batch file and Launch the Batch file(or link file)
---------
#Dump call_exe.bat(in Current Directory)
start .\exe_file\TESTMAIL.EXE
#END DUMP
-----------
I test it work Fine for :
Win7(32bit)+ office 2003+cdo
Win7(32bit)+ office 2007
Win7(32bit)+ office 2010(32bit)
Win7(64bit)+ office 2007(32bit)
Win7(64bit)+ office 2010(32bit)
Win7(64bit)+ office 2010(64bit)
In Win8 you can double click the .exe file and work Fine.
I didn't try FWH64.
--
Best Regards
--------------------------------------------------------------
kokoo KAO
-------------
best regards
kokoo Kao
best regards
kokoo Kao
Re: Bad Email Dreams ...
Randal,
I downloaded today the Catalyst trial version. I saw your DLL listing elsewhere.
Could you provide us with a sample of how you implemented this DLL ? Also you reference the LIB calls. Did you link in the LIB's that are included into your build ? I've got a build with xHarbour that uses Peles C, and one with MSVC 2010 which I know is supposed to be compatible with Catalyst.
In your notes you indicate you set this up for SSL. Their samples are a bit limited for what I'm trying to discover.
Your guidance would be greatly appreciated. Sadly many of the servers today want SSL and our TSMTP protocol in FWH does not support it.
Tim
I downloaded today the Catalyst trial version. I saw your DLL listing elsewhere.
Could you provide us with a sample of how you implemented this DLL ? Also you reference the LIB calls. Did you link in the LIB's that are included into your build ? I've got a build with xHarbour that uses Peles C, and one with MSVC 2010 which I know is supposed to be compatible with Catalyst.
In your notes you indicate you set this up for SSL. Their samples are a bit limited for what I'm trying to discover.
Your guidance would be greatly appreciated. Sadly many of the servers today want SSL and our TSMTP protocol in FWH does not support it.
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Bad Email Dreams ...
Tim,
After reading this thread, it sounds like most of the problems you are having are related to the SMTP setup--not the software's capabilities (with the exception of the SSL issue).
Can you give us some examples of SMTP servers that users are having problems with? I mean just the names of the servers like AOL, Hotmail, Cox, etc.
Note that only premium Yahoo accounts (paid) have SMTP access--free accounts don't. At least this was true the last time I checked which was a couple of years ago.
Near as I can tell, gmail accounts require SSL, but I have seen a reference to turning off this requirement. Turning it off would be an option although a much better option would be to have SSL capabilities in our FW TMail class.
Attachments ALWAYS have to include the COMPLETE PATH including the drive.
When you say everything always works for you, do you mean you are actually able to send to your client's SMTP server but they are not? Have you confirmed you are both using the same parameters? I know this can be touchy since you will need their password to test the system, but they could always change it while you test, then restore the original one.
You program could be getting blocked by their firewall.
You can find a lot of SMTP server's setup parameters on the net such as:
http://www.c3sd.com/email_servers_ports.php
http://www.emailaddressmanager.com/tips ... tings.html
You might consider including a list of common email servers for users to select from. Behind the scenes you would already have the setup parameters for each server in a file. Thus all the user does is select a server and add their username and password. This would prevent a lot of confusion.
Regards,
James
After reading this thread, it sounds like most of the problems you are having are related to the SMTP setup--not the software's capabilities (with the exception of the SSL issue).
Can you give us some examples of SMTP servers that users are having problems with? I mean just the names of the servers like AOL, Hotmail, Cox, etc.
Note that only premium Yahoo accounts (paid) have SMTP access--free accounts don't. At least this was true the last time I checked which was a couple of years ago.
Near as I can tell, gmail accounts require SSL, but I have seen a reference to turning off this requirement. Turning it off would be an option although a much better option would be to have SSL capabilities in our FW TMail class.
Attachments ALWAYS have to include the COMPLETE PATH including the drive.
When you say everything always works for you, do you mean you are actually able to send to your client's SMTP server but they are not? Have you confirmed you are both using the same parameters? I know this can be touchy since you will need their password to test the system, but they could always change it while you test, then restore the original one.
You program could be getting blocked by their firewall.
You can find a lot of SMTP server's setup parameters on the net such as:
http://www.c3sd.com/email_servers_ports.php
http://www.emailaddressmanager.com/tips ... tings.html
You might consider including a list of common email servers for users to select from. Behind the scenes you would already have the setup parameters for each server in a file. Thus all the user does is select a server and add their username and password. This would prevent a lot of confusion.
Regards,
James