Java scripts do not work in HTML email templates : I need to send an email using php, which could be easily done using SMTP, but the challenge is to embed a web service in the html mail, which is why I used java scripts in the body of the message to access the Web service when a button click is triggered.