Skip to content

Add support for Proxy (HTTP, SOCKS, authenticated) #38

@bbottema

Description

@bbottema

JavaMail only supports anonymous SOCKS proxy.

The only way to add this capability is by incorporating a SOCKS server into Simple Java Mail: it would be started when an email is being sent through Mailer.sendMail() and accepts the anonymous proxy connection from JavaMail on localhost and relays it to a proper proxy by also including a proxy client in Simple Java Mail which can connect to any proxy (HTTP, SOCKS, anonymous and authenticated).

So:

Mailer.sendMail() -> JavaMail Transport.send() (supports only anonymous SOCKS) -> Simple Java Mail temp proxy (anonymous SOCKS) -> Simple Java Mail proxy client -> the real proxy through which you want to go (HTTP, SOCKS, anonymous and authenticated)


But I don't want to balloon this library into the megabytes, because some open source proxy library included guava and netty and whatnot. Simple Java Mail is to remain a sleak library that includes everything in itself (by using the maven shade plugin).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions