Solve Amazon SES issues

Hints for Amazon Simple Email Service (SES):

  • avoid a misinterpretation like _amazonses.example.com.example.com in the DNS record name.
  • end a DKIM value with a dot to tell that the domain name is complete.
  • just remove and add a domain in order to successfully verify, having identical values.
  • DMARC does work; a dmarc=fail may be caused by SPF or DKIM setup.
  • for too many lookups see: https://tools.sparkpost.com/spf/inspector.
  • simple SMTP and advanced SDK transfer have different secure keys.
  • PHP manual: The ‘use’ keyword must be declared in the outermost scope of a file (the global scope) or inside namespace declarations. This is because the importing is done at compile time and not at runtime, so it cannot be block scoped. See workaround for ‘use’ keyword in code below.
  • a file containing credentials is an option. I do use a database table with a fillable form.
  • a spam score is raised by ‘forged reply to’, mentioning: FREEMAIL_FORGED_REPLYTO

Working PHP of SES in Software Development Kit (SDK or devkit):
Coding for improved SDK Usage