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.

Exception while sending mails from sahi through JavaMailer

BhavithaBhavitha Members
edited November -1 in Sahi - Open Source
sahi : Build: 2011-07-19
OS: windows 7
IE: 8

Hi all,

I tried to send emails from sahi java mail function as given in the link : http://sahi.co.in/w/sending-emails
When i used the host as gmail, i was getting error as "Java constructor for "net.sf.sahi.ant.Mailer" with arguments "string,number,string,string,boolean" not found. "
i have posted the same and here is the link : http://sahi.co.in/forums/viewtopic.php?id=3411
But i did not get any response....

Then i tried to use the office mail exchange server, but i am getting the exception as
"ERROR Wrapped javax.mail.SendFailedException: Invalid Addresses;
nested exception is: com.sun.mail.smtp.SMTPAddressFailedException 554 5.7.1 : Relay access denied "

The function is
function sendEmail($emailsubject,$emailbody)
{

var $host="host";
var $port=25;
var $username="test@fadv.com";
var $password="password";
var $isSSL=true;
var $mailer=new net.sf.sahi.ant.Mailer($host,$port,$username,$password);
var $from="test@fadv.com";
var $to="test@gmail.com";
$mailer.send($from,$to,$emailsubject,$emailbody);

}


Please advice

Thanks in advance

Regards
Bhavitha
Sign In or Register to comment.