View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12763 Members
Join this group to post and comment.
TheV
TheV • Apr 10, 2012

How to send E-mail from a page directly to any email address..??

Suppose I have a page in which there are lots of fields like name,age,suggestion etc as a textbox. Now I want to sent these field to any email address directly from the click of a button... I tried doing with some library functions but failed to do so. I search google too but didn't got any good example..!
Please give some ideas or sample code so that I can understand the concept..!
Kaustubh Katdare
Kaustubh Katdare • Apr 10, 2012
How about configuring any existing SMTP server (like Gmail) with your page? That's the easiest and the best way to send email from any page.
K!r@nS!ngu
K!r@nS!ngu • Apr 10, 2012
TheV
Suppose I have a page in which there are lots of fields like name,age,suggestion etc as a textbox. Now I want to sent these field to any email address directly from the click of a button... I tried doing with some library functions but failed to do so. I search google too but didn't got any good example..!
Please give some ideas or sample code so that I can understand the concept..!
Which programming language you are using ?
Every language will have seperate library functions, in which the SMTP server configuration will be defined.
Suppose in JAVA The header files are :
import javax.mail.*;
import javax.mail.internet.*; 
We have to define the methods as per our requirement.
TheV
TheV • Apr 11, 2012
I am using j2ee technology. I am working on web Application in which I have a suggestion box from which a user can write anything and just click a button to sent a email to administrator.
I am using NETBEAN 7.1 IDE so what library should I use and how to configure I don't know anything about it. How do I start ..please give any sample code so I can understand. ..
deepu11111111
deepu11111111 • Apr 11, 2012
Nice TheV
You can send the data that entered in the text fields to your mail through Php
Here is the code




Name
E-mail Address
Mobile Number
What type of job are you looking for? Programmer Designer Manager
Paste your resume hear (Press ctrt + v hear....)
Which programming languages do you work with? PHP Java .NET
Langueges Known To select multiple Langueges drag over the Langueges, to select altnernate Langueges Ctrl-click on the Languege .
How do you prefer to be contacted?




[b]Privacy Policy[/b]: the information you provide will not be shared it is only for the use in our selection of potential employees.

The bellow php code sends the data to your mail
Thank you $name we will get back to you shortly";
print "
$date
"; // Send to specificed email address $to ="pradeepchandramaddirala@gmail.com"; $subject = "Job Application form"; $body =" Date: $date \n Name: $name \n HiddenField: $hiddenField \n Email address: $email \n Mobile Number: $age \n Job: $job \n Resume: $address \n Programing Languages: $languages1 $languages2 $languages3 \n Languege Known: $daysavailable[0] $daysavailable[1] $daysavailable[2] $daysavailable[4] \n Contact: $contact \n\n"; mail($to,$subject,$body); ?>
SKsinha
SKsinha • May 13, 2012
Thanks for sharing this PHP script. I had a similar script used on one of my HTML website but the problem there was if I use any google or yahoo mail account then it is not delivered either or delivered with mail@mailserver.com not in the name/email id of sender. Changing the email id to one of those configured with site hosting, results were as desired. Now I am using another script but could never solve this problem, don't know where the problem was ? at my server or in the script ?

Share this content on your social channels -