+ 1
I need a JavaScript code to send mail
the receiver mail id is our company's id. and the sender id is the user one who visits our site. i don't want to log them in to their mail domain. simply, user mail id : Subject: Text: (send button)
5 Answers
+ 4
sending email via JavaScript only isn't possible. you'd have to compose the email and then open the user's standard email program. but that's not very elegant and doesn't save the user any time or effort.
in PHP there's the mail() function which sends the email directly, so there's no need for external programs to open.
+ 4
sure you can. just encapsulate your PHP code in <?php and ?>
and make sure your server knows PHP.
+ 2
ok... so i need to learn php alsođŹđŹ
+ 1
Hey Solomon! Take a look at our service - emailjs.com. We built it to allow people sending email from Javascript by creating an email template (possibly with dynamic variables) and then trigger this email using a simple call to our Javascript library.
Good luck!
0
can i use php code in an html page??? if yes i can use php also..