[英]addReplyTo doesn't seem to work
everyone. 大家。
I'm trying to configure a email specifying an email address to reply to using the addReplyTo method and although the email is sent successfully 我正在尝试配置一封电子邮件,指定使用addReplyTo方法回复的电子邮件地址,尽管该电子邮件已成功发送
when I log into the email account( octunprg@gmail.com ) to read and reply to the email that has just been sent, the email address that appears in the To field is the same email address ( octunprg@gmail.com ) not the one I indicated using "addReplyTo"( eddysmith1818@gmail.com ) when I set the email. 当我登录电子邮件帐户( octunprg@gmail.com )以阅读并回复刚刚发送的电子邮件时,“ 收件人”字段中显示的电子邮件地址是相同的电子邮件地址( octunprg@gmail.com ),而不是设置电子邮件时,我使用“ addReplyTo”( eddysmith1818@gmail.com )表示。
Is it the normal operation?? 这是正常操作吗? Am I doing something wrong?? 难道我做错了什么??
Email email = new SimpleEmail();
email.setHostName("smtp.gmail.com");
email.setSmtpPort(587);
email.setAuthenticator(new DefaultAuthenticator("octunprg@gmail.com", "123456"));
email.setTLS(true);
email.setFrom(from, name);// 'eddysmith1818@gmail.com', 'Eddy Smith'
email.setSubject(subject);
email.setMsg(message);
email.addReplyTo(from, name); // 'eddysmith1818@gmail.com', 'Eddy Smith'
email.addTo("octunprg@gmail.com");
email.send();
这可能是您的电子邮件客户端(我看到的是Gmail)中的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.