18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

SendingEmail:getting error as "Java constructor for "net.sf.sahi.ant.Mailer" with arguments "string"

edited July 2013 in Sahi - Open Source
I am trying to send email using sahi after executing my script .
I have followed all the steps mentioned on "http://sahi.co.in/w/sending-emails";
Also I have set Sahi’s classpath but still not able to send email.
I am getting following error " Java constructor for "net.sf.sahi.ant.Mailer" with arguments "string,number,string,string,boolean" not found."
Can anyone please help me on this.

Best Answers

  • Hi Abhijeet,

    If you're using Sahi OS,
    please replace the following lines in your code
    var $isSSL = true; // set to true if you use SSL
    var $mailer = new Packages.net.sf.sahi.ant.Mailer($host, $port, $username, $password, $isSSL);
    

    with
    var $mailer = new Packages.net.sf.sahi.ant.Mailer($host, $port, $username, $password);
    

    If it still doesn't work for you, please let me know.

    Regards.
  • Hi abhijeet,
    Can I close this discussion now that it works for you?

    Regards.

Answers

Sign In or Register to comment.