News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Send a file to SMTP using masm32/Please help me

Started by hamidfarhadiyan2, March 17, 2014, 02:28:49 AM

Previous topic - Next topic

TWell

I can't get it working with Hotmail :(
gmail smtp works. (smtp.gmail.com 465).
Anyone else ?

hamidfarhadiyan2

smtp.gmail.com is block in my country :( :( :(
Please help

TouEnMasm


You need to debug your source code
Quote
INVOKE   SetFieldItem,pFlds,ADDR sndu,0,2   ;error

SetFieldItem line ;call DWORD PTR [eax+28h]
++ EH exception - code e06d7363 (first chance)
Fa is a musical note to play with CL

TWell

#18
Quote from: ToutEnMasm on March 20, 2014, 09:44:16 PM

You need to debug your source code
Quote
INVOKE   SetFieldItem,pFlds,ADDR sndu,0,2   ;error

SetFieldItem line ;call DWORD PTR [eax+28h]
++ EH exception - code e06d7363 (first chance)

More info, please.
- What OS, assembler, linker ?
I can't see that exception in WindowsXP SP3 or Windows 7 SP1.
(using ml.exe 9.0, JWAsm.exe 2.12, POAsm.exe 7.0)


Simple vbs test for Gmail:
password = InputBox("Password:")
Set objEmail = CreateObject("CDO.Message") 
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "foo@gmail.com"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = password ' from InputBox
objEmail.Configuration.Fields.Update
objEmail.From = "foo@gmail.com" 
objEmail.To = "foo@gmail.com" 
objEmail.Subject = "CDO Test" 
objEmail.Textbody = "CDO Test" 
'objEmail.AddAttachment "c:\temp\test.txt"
objEmail.Send

TouEnMasm


I have WindowsXP SP3 ,jwasm 2014,and link of vc++ 2010
Fa is a musical note to play with CL

Vortex

I tested the script but it displays an error message indicating : The transport failed to connect to the server. Error code :80040213
Sender account =Gmail


TWell

Quote from: Vortex on March 21, 2014, 05:59:58 AM
I tested the script but it displays an error message indicating : The transport failed to connect to the server. Error code :80040213
Sender account =Gmail
With parameters server smtp.gmail.com and port 465 ?

Vortex

Hi TWell,

Exactly. No matter what I do, it does not work. There are similar complaints on the net :

http://stackoverflow.com/questions/21716487/cdo-message-1-error-80040213-with-google-address

TWell

So,
cdosys support only plain and SSL ?
- Gmail uses SSL in port 465, cdosys support that.
- HotMail uses TLS/STARTTLS in port 587, cdosys don't support that.

Vortex

Hi Twell,

Finally, I found the issue: the sendusername field should be accountname not accountname@gmail.com  Thanks for your code.

TouEnMasm

Fa is a musical note to play with CL

hamidfarhadiyan2

Hi vortex and.... I'm thank you of you and... ,
Please post your final script and final version for use Hotmail&Ootlook

TouEnMasm


Here a workink sample of cdo in asm
It use the include files downloadable in the windows.inc subforum (sdk and vc++).
Modify of the parameters is easy (all are in normal text)
Fa is a musical note to play with CL

TWell

Quote from: hamidfarhadiyan2 on March 21, 2014, 07:01:15 PM
Hi vortex and.... I'm thank you of you and... ,
Please post your final script and final version for use Hotmail&Ootlook
cdosys don't work with HotMail :(

This can help you:
http://smtpproxy.codeplex.com