2

I want to use Sendmail in the localhost and I have to set up SMTP in the sender mail. But my password has a hash character(#) in it. How do I make it not appear as a comment start?

auth_username=email@gmail.com
auth_password=password#
iamafasha
  • 848
  • 10
  • 29
  • 1
    "INI file" is an _informal_ standard, with many [varying features](https://en.wikipedia.org/wiki/INI_file#Varying_features). If your INI parser did not support comments, you wouldn't be in this fix. If your INI parser supports escape character or quoted values, there is an easy solution. Without knowing what is reading your INI file, it is impossible to say how to solve this, or if this is even solvable. If it's PHP's `parse_ini_file` (or `parse_ini_string`), quotes work. – Amadan Dec 12 '19 at 06:46
  • So what are the features for the one [sendmail](https://en.wikipedia.org/wiki/Sendmail) uses? – iamafasha Dec 12 '19 at 07:04
  • @novapack; Please mark the answer if it was helpful or comment it if-else. – XAMT Apr 16 '20 at 07:37

1 Answers1

1

From the parse_ini_file documentation, in the changelog for PHP 5.3.0 and above:

Hash marks (#) should no longer be used as comments and will throw a deprecation warning if used.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
XAMT
  • 1,515
  • 2
  • 11
  • 31
  • I am using xampp and Sendmail looks like it is on its own and PHP is on its own? – iamafasha Dec 12 '19 at 06:57
  • How to check PHP version : https://stackoverflow.com/questions/15517718/find-php-version-on-windows-command-line/15517857 – XAMT Dec 12 '19 at 07:06