Example for JMail

dgroeserdgroeser Member Posts: 39
Hello,

have got anywhere an example for JMail.

I want sent a e-mail per smtp with authentification.

Bye
«1

Comments

  • ara3nara3n Member Posts: 9,256
    edited 2006-09-16
    IF ISCLEAR(JMail) THEN
      CREATE(JMail);
    
    JMail.Silent := TRUE;
    JMail.From := 'From@mibuso.com' ;
    JMail.FromName := 'admin guy';
    JMail.AddRecipient('to@mibus.com');
    JMail.Subject := 'this is a subject';
    JMail.AddAttachment('c:\file.txt',FALSE,'text/plain');
    
    IF JMail.Send( '192.168.01.1') THEN BEGIN  //this is smtp server ip
      message('Processed');
    END ELSE BEGIN
     message(JMail.ErrorMessage);
    END;
    
    JMail.Clear;
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • girish.joshigirish.joshi Member Posts: 407
    Nice --- looks vaguely familiar. :D
  • ara3nara3n Member Posts: 9,256
    Are you sure? 8)
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • dgroeserdgroeser Member Posts: 39
    have you a example for pop with jmail?
  • ara3nara3n Member Posts: 9,256
    Nope I don't. I never needed to interface with POP. I'm sure you can find it on their website.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • vyankuvyanku Member Posts: 791
    what must be the subtype of datatype automation of veriable JMAIL in the above code?
  • ara3nara3n Member Posts: 9,256
    type automation subtype Jmail com object that is registerd which is jmail.dll.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • vyankuvyanku Member Posts: 791
    type automation subtype Jmail com object that is registerd which is jmail.dll.

    If I have to do this for outlook then subtype is 'Microsoft Outlook 10.0 Object Library'.Action ?

    or first we have to registered the domain using for outlook?
  • ara3nara3n Member Posts: 9,256
    I'm not familiar with MS outlook object library. But I'm pretty sure you need to set it up with the server.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Heike_BennerscheidHeike_Bennerscheid Member Posts: 23
    I installed JMail and registered the DLL's but I can't find them in the automationslist in Navision. I registered them with regasm and gacutil.. was this wrong? Do I have to use regsrv32? I would be glad if somebody could give me some hints.
  • garakgarak Member Posts: 3,263
    was the navision client opened while you register the dll :?:

    register the dll please with regsrv32. But the dll must have an entry point for register with regsrv32 and use with navision.
    Do you make it right, it works too!
  • Heike_BennerscheidHeike_Bennerscheid Member Posts: 23
    No Navision Client was closed. I tried to registered it with regsvr32 but it didn't work. The DLL has no entry point.
  • garakgarak Member Posts: 3,263
    mhm, i use jmail_free.msi (DIMAC). it workes.
    Do you make it right, it works too!
  • Heike_BennerscheidHeike_Bennerscheid Member Posts: 23
    I used jmailnet_free.msi
    The DLL's are called Dimac.JMail.dll and Dimac.JMail.Smtp.dll

    Is it the wrong file?
  • garakgarak Member Posts: 3,263
    edited 2008-03-19
    thats the .net solution. So browse how to use this. (regasm.exe for registering an need .net framework)
    Do you make it right, it works too!
  • Heike_BennerscheidHeike_Bennerscheid Member Posts: 23
    I downloaded the other JMail File. It looks like this is the right one. Thanks garak. Without you I maybe hadn't realised it.
  • garakgarak Member Posts: 3,263
    i hope i could help
    Do you make it right, it works too!
  • ara3nara3n Member Posts: 9,256
    you are using the .NET version, and you need to use instead of regsvr32 regasm.exe
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    use the non .net version, the older version. 3.x
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Heike_BennerscheidHeike_Bennerscheid Member Posts: 23
    JMail.dll works fine. Thank you for your help.
  • garakgarak Member Posts: 3,263
    =D>
    Do you make it right, it works too!
  • hxrhxr Member Posts: 20
    Hello,

    where could i find Jmail free ocx, or other component you are talking about?
    (i have googled but no luck for the free Jmail)

    Thanks,
    hxr
  • garakgarak Member Posts: 3,263
    If i ask "google" i found a lot of download topics about "jmail" "jmail freeware" "jmail download" ....
    jmail is a product of "dimac"
    Do you make it right, it works too!
  • hxrhxr Member Posts: 20
    I got it, thank you :)
  • gunavsgunavs Member Posts: 32
    Hello,

    I have setup a report in navision to print to pdf and email it to the customer. Thanks to ara3n i was able to do it with bullpdf and JMail. But for some reason, the email is getting rejected by my outlook. It does not show. I checked it with other mail accts like yahoo, gmail and they seem to work fine. Any ideas?
  • ara3nara3n Member Posts: 9,256
    You can also use Microsoft.Navision.Mail.dll. You can look in 5.0 CU 400 on how to use it.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • gunavsgunavs Member Posts: 32
    It was my relay settings in my server which had caused issues. After enabling it it worked fine!! Thanks ara3n. Its been working fine for a year but we might be upgrading atlaast and i might use the inbuilt smtp for emailing hopefully
  • ara3nara3n Member Posts: 9,256
    It's great to hear that it's been working fine for a year now. I would keep it as is.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • navuser1navuser1 Member Posts: 1,329
    Jmail is giving me the following error message :


    What will be the reason behind it ?? :-k :-k
    Now or Never
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    According to this document, http://www.answersthatwork.com/Download ... _Codes.pdf , SMTP error 530 means:
    Authentication is required

    or

    Your server has been blacklisted by the recipient’s server

    or

    The recipient’s mailbox does not exist
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Sign In or Register to comment.