我在这里得到了这个教程......
但是,如果我有DATABASE中要发送电子邮件的电子邮件地址列表,该怎么办?
TestMail类
public class TestMail {
public static void main(String... args) throws Exception {
// Create mailer.
String hostname = "smtp.example.com";
int port = 2525;
String username = "nobody";
String password = "idonttellyou";
Mailer mailer = new Mailer(hostname, port, username, password);
// Send mail.
String from = "john.doe@example.com";
String to = "jane.doe@example.com";
String subject = "Interesting news";
String message = "I've got JavaMail to work!";
mailer.send(from, to, subject, message);
}
}
Run Code Online (Sandbox Code Playgroud)
JSP
<form action="contact" method="post">
<p>Your email address: …Run Code Online (Sandbox Code Playgroud) 是否可以将其转换为varchar结果..
select date_trunc('week', '2013-02-01'::date);
Run Code Online (Sandbox Code Playgroud)
我将把它用于具有varchar数据类型的"Where"子句
谢谢
我想问一下页面加载后如何使用这两种功能
jQuery(document).ready(function($)
{
$('#list').tableScroll({height:500});
});
Run Code Online (Sandbox Code Playgroud)
和
jQuery(document).ready(function($)
{
$('#list').tableSorter();
});
Run Code Online (Sandbox Code Playgroud) 我在我的try子句中有这个...如果我删除pst.setString(5, value5)它工作正常,如果我删除所有整数值也可以工作,但如果添加了所有整数和value5,我就无法工作...
try {
Class.forName("org.postgresql.Driver");
connection = DriverManager.getConnection(connectionURL, "username", "password");
String sql ="UPDATE table1 SET value1 = ?, value2 = ?, value3 = ?, value4 = ? value5 = ? WHERE value6 = ? ";
PreparedStatement pst = connection.prepareStatement(sql);
Integer value1A = Integer.parseInt(value1),
value2A = Integer.parseInt(value2),
value2A = Integer.parseInt(value3),
value2A = Integer.parseInt(value4);
pst.setInt(1, value1A);
pst.setInt(2, value2A);
pst.setInt(3, value3A);
pst.setInt(4, value4A);
pst.setString(5, value5);
pst.setString(6, value6);
int numRowsChanged = pst.executeUpdate();
pst.close();
}
Run Code Online (Sandbox Code Playgroud) java ×2
jsp ×2
jakarta-mail ×1
javascript ×1
jquery ×1
netbeans ×1
netbeans-7 ×1
postgresql ×1
servlets ×1
sql ×1