Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sending email using "bcc" without "to" in java application

I have read all the reference in stackoverflow. However, nothing matches in our goal. How can i use bcc in sendmail method in java?

like image 939
tabassum Avatar asked Nov 25 '25 14:11

tabassum


2 Answers

According to the RFC for SMTP, RFC 2821 (link), it is not possible to send an email message without a To: header. (You cannot send an RCPT command without it, see section 3.3.)

like image 71
Dietrich Epp Avatar answered Nov 27 '25 02:11

Dietrich Epp


As Dietrich mentions, that's not possible with the RFC. If the primary goal is to send to the bcc target email addresses, you could provide a dummy to email address (such as your own email address or a reply-to email), which would fulfill that technicality while still allowing you to send the email to the desired bcc targets.

like image 37
JW8 Avatar answered Nov 27 '25 04:11

JW8



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!