0

I am not even certain if this is possible in PHP. Would it be possible to receive/read e-mails sent to my domain without needing to check the username specifically? eg:

$subject = $_MAIL[?]->Subject;

$user = $_MAIL[?]->Username;

Or something along that line? Basically I want to know the step before a mail server stores it in a database I know it won't be that simple.

Jaap
  • 81,064
  • 34
  • 182
  • 193
John Smith
  • 347
  • 1
  • 11
  • There are no vars defined as $_MAIL. This could be helpful for you http://stackoverflow.com/questions/11872643/php-library-to-read-email – Antonios Tsimourtos Oct 31 '16 at 16:12
  • PHP alone can't handle the mail, you need to either query the place that is receiving it or build something that receives it which you can query and then forwards it. For instance if you had mail sent to Mandrill you could query inbound mail on their API. https://mandrill.zendesk.com/hc/en-us/articles/205583197-Inbound-Email-Processing-Overview there is a lot of variations here to consider depends on the systems you are using and what you want to achieve. – Matt The Ninja Oct 31 '16 at 16:12
  • I know I made up the variable mail @tony – John Smith Oct 31 '16 at 16:13
  • Did you take a look at any tutorials, examples of email using PHP before asking? – RST Oct 31 '16 at 16:19
  • When I looked up this topic I could only see the ones of people using email username/password which was already stored in a database. I was hoping there was a way of not requiring it as the emails will be destroyed after the program reads them and I can not look up emails with a username. @RST – John Smith Oct 31 '16 at 16:23
  • Misread your question. Thought you needed email send to you. But you want emailaccount access without account credentials. Are those emails generated by a form on your website or just randomly sent by randam people? – RST Oct 31 '16 at 16:32
  • Sorry for the delay @RST They were going to be anything so a@domain.com should be the same as b@domain.com as the username should be chosen randomly and be used to read the subject the same – John Smith Oct 31 '16 at 19:42
  • You lost me. If you can describe your scenario in a little more detail someone might be able to help you. There are always different ways to do things. – RST Nov 01 '16 at 10:41

0 Answers0