473,732 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to do authentication and include the web page in the mail?

BB
Below is my sendmail jsp (I copied it from somewhere else and it works for
me). It fetches the message from another page and sends it to a email. The
problem is that the smtp needs authentication. How do I add the
authentication detail in this jsp? And, how do I include the web page
instead of plain text in the email to be sent just like how it appears in
the email text area when I hit "Send page by email". Thanks.
<%@ page import="sun.net .smtp.SmtpClien t, java.io.*" %>
<%
String strParm = request.getPara meter("Message" );
String from="1@2.com";
String to="2@3.com";
try{
SmtpClient client = new SmtpClient("smt p.2.com");
client.from(fro m);
client.to(to);
PrintStream message = client.startMes sage();
message.println ("To: " + to);
message.println ("Subject: New Mail");
message.println (strParm);
client.closeSer ver();
}
catch (IOException e){
System.out.prin tln("ERROR SENDING EMAIL:"+e);
}
%>
_______________ _______________ _______________ _______________ _____
¡¹ ª±®a¶K¤h´ú¸Õª©¥ ¿¦¡µn³õ! http://www.bet.com.hk ¡¹

¦øªA¾¹¦«ºÞ¤Î¯²¥ ΪA°È¡A¥Ñ Newsgroup.com.h k Limited ±M·~ºÞ²z¡C
¤ë¶O§C¦Ü $300 ¡A¸Ô±¡½Ð*P¹q 3078 6888
Jul 17 '05 #1
0 1569

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
9287
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
4
5566
by: Jay | last post by:
I have authentication set for my site but I need one page to be an exception case. Namely my forgot password page. How do I tell the webconfig file to authenciate all pages except one page? Thank You for any input on this matter!
11
3597
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get any requested page to automatically go to the Login.aspx page, AND, the ReturnURL querystring is correct in the address bar, but no matter what, I can't get it, once the user is authenticated, to redirect to the new page. It ALWAYS refreshes the...
3
3680
by: Ashish Kanoongo | last post by:
Let me know the best authentication method and why ? I am asking in ASP.NET using C#. 1. Windows Builtin authentication 2. Passport base authentication 3. Form Based Authentication 4. Default (IIS) Authentication --- Outgoing mail is certified Virus Free.
0
4239
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
5
2877
by: Gavin Stevens | last post by:
I'm trying to figure out the ASP.NET Forms Auth I have 3 or 4 pages i want to allow anonymous access to.. Then I have 5 or 6 pages I placed in another directory in the webproject. These I want to manually authenticate users to provide acess My project has 2 web.config files... the default file <authentication mode="Forms"><forms loginUrl="Login.aspx" protection="All" timeout="30"...
6
2866
by: William F. Zachmann | last post by:
We've got a project going that involves moving an old web site with a massive dll written in C++ that produces most of the output from a SQL 7.0 data base on NT4 onto IIS on Windows 2003 Server with SQL 2000. All new code is being written in C# using ASP.NET and we are using forms authentication to control access to particular directories/applications. We are having a hard time figuring out how to configure the thing so that existing...
1
3544
by: bindu83 | last post by:
hi friends, this is bindu.am working on LINUX platform. i have a web page for email authentication.the fields in the age include the smtp server ip,password, from address,to address,subject and message. now when i click on the send button, the email page must be authenticated with SMTP server and able to send that mail.the authentication process must be automated. can anyone help me how to do this in perl. thanks in advance for the...
6
1712
by: AbraAbraCadabra | last post by:
Here is the code I have been using to send mail... Set objCDO = Server.CreateObject("CDO.Message") With objCDO .To = strTo .From = "markus@domain.com" .Subject = "This is the subject" .HtmlBody = "This is the Body" .Send End With
0
8944
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9180
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2177
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.