Selenium Script

Explore Selenium Automation

QTP or Selenium email sending problem.

QTP or Selenium email sending problem.

How to install BLAT command Line SMTP Mailer on Windows system.

We are doing lots automation using selenium and QTP or other tool. We are always facing common one problem that is “Sending automation result to group of people using email”. I know you are aware about VBScript in build functionality to send email and same way in java in selenium.

I did many project conversions from QTP to selenium and SOAP UI integration with selenium. There is always worry about email sending. I did some search in Google to find better solution give common solution to send email for QTP, Selenium and any other automation method.

I found one solution that called “http://www.Blat.net “. It is very powerful tool. You can send all kind of result to as many people you wants. You do not need to write this regular code VBScript Code

It is simple to use and effective too.

Now download blat from http://sourceforge.net/project/showfiles.php?group_id=81910 when you click here you will redirect to this URL : http://sourceforge.net/projects/blat/files/

Click to download Now !

media_1259000922928

 

You will download zip folder that have Blat setup and other installation files.

media_1259000986328

 

Click To save and extract that files

media_1259001505550

Now you will see following files in extract folder :

  • blat.dll
  • blat.exe
  • blat.lib

media_1259001839517

 

Now copy all that files an past to system folder

For 32 & 64 bit c:\windows\System32

Now past this files into above folder. Make sure blat.exe and other files are there.

Open COMMAND PROMPT as Administrator.  Go to c:\windows\System32

Run this command

media_1259002004856

You need your smtp server name most of time POP3 and SMTP server name are same like smtp.domainname.com and pop3.domainname.com or it can be IP address too.

Basic command : blat -install smtp.domainame.com example@domainame.com

Example: if my comany website example.com and i want to send email from info@example.com

blat -install smtp.exmple.com info@example.com now click enter to execute command you will see screen like this and you can test too, Below snapshot will help to understand execution part too.

media_1259002242507

 

How to test ?

Now create one text file call example.txt and add content ” HI” in c directory c:\example.txt

OPEN COMMAND LINE AS Adminstrator and fire this line

blat C:\example.txt -s example_subject -to info@example.com

It will send email. so example.txt is your result.

You can create above command line code using any script and it will execute dynamically and will send result to all the person whom you want to send.

 

 

 

Comments are currently closed.

One thought on “QTP or Selenium email sending problem.