Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Authentication with SMTP Server  RSS feed

 
Jignesh Kakkad
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
I m Jignesh Kakkad..

I want to know how i can send the USER name and Password to my SMTP Server.

May i have code of that..

Jignesh
 
Arun Prasath
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You wont send your username and password to your SMTP server. You will send it only to your pop3 server to retrieve mails. For sending mails, using SMTP server, we dont need username and password. If relaying is enabled in SMTP server, that will be sufficient.
 
William Frantz
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most SMTP servers have relaying shut down to prevent SPAM traffic. If your SMTP requires authentication then you will indeed have to provide a username/password.

I wrote a MIDlet that sends e-mail through Sprint's smtp.sprintpcs.com server. It requires a Base64 encoded username/password. I started by reading the SMTP RFC to learn the protocol. Then I just opened up a port and started sending commands. It works fairly well.

William Frantz
http://sprintdevelopers.com
 
manoj pillai
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:

1. EHLO
2. AUTH PLAIN {Base64 encoding of "\000" + user + "\000" + password}
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!