Cheap UK Web Hosting Company, Cheap Web Hosting UK, Low Cost Webhosting Space, Low Cost Web Site Hosting UK, Domain Hosting UK and Domain Name Registration
The example below shows you how to firstly connect to the local SMTP server and then create the JavaMail message and finally send the message through this SMTP connection. Change the parameters in red to suit your needs.
<%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
<%
Properties props = new Properties();
props.put("mail.smtp.host", "localhost");
Session s = Session.getInstance(props,null);
InternetAddress from = new InternetAddress("ENTER_SENDER_EMAIL_ADDRESS");
InternetAddress to = new InternetAddress("ENTER_RECIPIENT_EMAIL_ADDRESS");
MimeMessage message = new MimeMessage(s);
message.setFrom(from);
message.addRecipient(Message.RecipientType.TO, to);
message.setSubject("ENTER_SUBJECT");
message.setText("ENTER_MESSAGE");
Transport.send(message);
%>
If you have a question that you cannot find the answer to here, please email support@webconexion.net
Get online now with your choice of UK or International domain name.
UK domains £3.25 p/a International domains £10 p/a Web forwarding services E-mail forwarding services POP/IMAP E-Mail accounts NEW Spam E-Mail Protection NEW DNS Configuration NEW Change nameservers Upgrade to web hosting No release fees
The domain control panel (DCP) is provided as standard with all parked domain accounts.