我编写了以下代码,用于通过SMTP作为TLS使用javamail API发送电子邮件,因为不支持SSL,但我最终遇到以下异常.请参阅下面的代码.我使用过调试模式,在代码下面你也可以找到异常.
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class SendMailTLS {
public static void main(String[] args) {
final String username = "---------@mydomain.com";
final String password = "***********";
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", "mail.mydomain.com");
props.put("mail.smtp.debug", "true");
props.put("mail.smtp.port", "587");
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
session.setDebug(true);
try {
Message message = new MimeMessage(session);
message.setFrom(new
InternetAddress("---------@mydomain.com")); …Run Code Online (Sandbox Code Playgroud) 在Excel中,我将单元格值作为数字格式10/2.它显示为10/2但我想5.00.
它评估5.00我是否=在它之前添加,即,=10/2但我不想编辑该列的大约500行.
我尝试使用VALUE函数,但它将其计算为42279.00:
细胞B1 10/2
细胞B242279.00
另一个数据示例是:100/20.
你能否告诉我出了什么问题,或者有没有办法让细胞值得10/2到评估5.00?