Options

SMTP OCX Ver 1.6 user documentation

chen_wanchen_wan Member Posts: 34
Dear All,

I have downloaded the SMTP OCX component. Where can I find the documentation / user guide / sample on how to use the SMTP OCX component.

:shock: :shock: :shock:

Thank You

Comments

  • Options
    g_dreyerg_dreyer Member Posts: 123
    Hi Chen,

    This is not documentation, but at least shows you how to use it. :wink:
         SMTPMail.NewMessage(EmailRecipient,Subject);
         SMTPMail.SetWorkMode();
     
         SMTPMail.SetHost('<<your servername here>>');
         SMTPMail.SetUserID('<<your username here>>');
    
         SMTPMail.AddLine(TextLine[1]);
         SMTPMail.AddLine(TextLine[2]);
         SMTPMail.AddLine(TextLine[3]);
    
         SMTPMail.AddAttachment(Filename);
         SMTPMail.SetToAdress(EmailRecipient);
    
         SMTPMail.Send; 
     
         IF NOT SMTPMail.WasSuccessful THEN 
           MESSAGE(SMTPMail.LastError);
    
    

    Where FileName,EmailRecipient,Subject,TextLine[Array] are all text variables.
    It should be enough for you to get started.

    Regards,
    Gustav
  • Options
    chen_wanchen_wan Member Posts: 34
  • Options
    hawwahawwa Member Posts: 106
    I tried the sample given below but I got the SMTP Error 0. What caused the Error 0 to occur.
  • Options
    hawwahawwa Member Posts: 106
    After I changed the SetHost parameter, I received Error 10035. What had caused the Error 10035.

    Thank You
  • Options
    WiechardtWiechardt Member Posts: 25
    If you want to get a more detailed description on a SMTP Error (remember, the error messages that are raised from the SMTP OCX are standard SMTP messages) you can go to www.google.com and enter the text 'SMTP Error x'.

    You will find it all there.

    Have fun!
  • Options
    janpieterjanpieter Member Posts: 298
    10035 is i believe a winsock component error. You can look this up in MSDN.
    In a world without Borders or Fences, who needs Windows and Gates?
  • Options
    hawwahawwa Member Posts: 106
    how to set password for the SMTP component. My mail server required authentication.
Sign In or Register to comment.