Reputation: 653
I have created an application where I could send a mail with Mail API. Therefore, for that I had to provide the email id and password of the source mailbox.
Refer the code below:
Mail sender = new Mail("sourceEmailID", "sourcePassword");
sender.sendMail("Subject","Body","sourceEmailID", "destinationEmailID");
Now, I dont want to provide the harcoded password inside my source code. Infact I want to convert it into asterisk form or any other secured form.
But the value shouldn't change when calling the original form.
What should I do to for this!
Thanks in advance.
Upvotes: 1
Views: 66
Reputation: 3807
You will need the plain text password in any case while creating Mail
Object.
To improve security,
you should:
Mail
objectThis should provide you enough security.
Upvotes: 1