-1

I am trying to send an email using SMTP without username & password as below:

var $smtp_host = "*****";  // SMTP Server. 

var $smtp_user = "";  // SMTP Username

var $smtp_pass = '';  // SMTP Password

var $smtp_port = "443";  // SMTP Port 25, 587

So is it possible to send email with this config setting?

Pradeep
  • 9,667
  • 13
  • 27
  • 34
  • 1
    Next time maybe just check whether it works... Probably faster than waiting for an "answer" here on SO anyway – Capricorn Aug 13 '18 at 12:42
  • 3
    Possible duplicate of [how to send email from localhost using codeigniter?](https://stackoverflow.com/questions/30702003/how-to-send-email-from-localhost-using-codeigniter) – SirPeople Aug 13 '18 at 12:53

1 Answers1

0

You will always need username and password. please read about smtp... PHPmailer would be helpful if your using codeigniter

https://github.com/PHPMailer/PHPMailer/wiki/Tutorial

Avi
  • 1,424
  • 1
  • 11
  • 32
  • I tried that already but it wont work. Authorizations fails if we provide both username and password as a blank. So suggest any way to make that authorization possible without setting username and password. – Nitin Kamble Aug 15 '18 at 09:02
  • I'm trying to tell you that it is not possible to send smtp email without email or user and password... Nobody will allow you to send it without Authorizations because it is matter of security!!! If tit would be possible then anyone would had used it with another email. – Avi Aug 16 '18 at 06:07
  • Yes avi you are right, I tried the same and figured out the same thing you mentioned here. Thanx for the update. – Nitin Kamble Aug 17 '18 at 15:02
  • it is possible. i have seen scenarios where smtp are configured to send without username and password in a intranet setting. whether or not security is taken into account that is another issue altogether. – Rejinderi Mar 13 '19 at 01:18
  • How about using users' email account and password to send to the others? – Ngô Văn Quyền Jan 30 '20 at 04:49