Module Description

This module is used to send mails via Amazon SES. instead of usind Drupal's native mail system.

Advantages of this module

  • You need not setup your own SMTP server.
  • lesser configuration, just setup your AWS credentials and you are all set.
  • This module sends email via Amazon SES by directly calling API.

How to install it

  1. Just like other module , donwload it via drush or FTP, and enable it.

Dependencies

  1. Libraries
  2. awssdk

Configuration

Follow these steps:

  1. Provide your AWS Security Credentials "admin/config/media/awssdk", it is must, so that this module can
    send api request to your AWS account. For more details about AWS Credentials
    read through http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html.
    Get your access key here https://portal.aws.amazon.com/gp/aws/securityCredentials.
  2. Amazon SES requires that you verify your email address or domain, to confirm that you own it and to prevent others from using it. so you must verify your sender id. For this go
    to "admin/config/aws-settings/aws-verify-ses-sender-id". If you don't have Production
    Access to Amazon SES, you must verify recipient's mail addresses.

Project page

https://www.drupal.org/project/amazon_ses

Clone command

git clone --branch 7.x-1.x http://git.drupal.org/project/amazon_ses.git

Manual reviews of other projects

Similar Modules

Upcoming Features

  1. Meaningful feedback, i.e. who has read mail, who spammed it, who have not received yet.
  2. Integration with https://drupal.org/project/simplenews module.

Comments

tkuldeep17’s picture

Issue summary: View changes
mandar.harkare’s picture

Status: Needs review » Needs work

Doing review on

Commit f2f8e91 on 7.x-1.x

Automated Review

(*)Please clear the code sniffer issues found by pareview.sh.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
No: A quick google search gave me couple of results Amazon SES and SMTP Authentication Support. Can you please explain what unique functionality does this module provide?
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements
3rd party code
(*)No: Please follow the guidelines for 3rd party code. Consider the use of libraries mmodule instead.
(+)README.txt/README.md
It would be preferable if you could take a reference of the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
  1. (*) Major finding
  2. Minor finding
  3. (+) Release blocker

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

tkuldeep17’s picture

Issue summary: View changes
StatusFileSize
new57.23 KB
new26.58 KB
new63.48 KB
new38.59 KB

Add similar module region and update module description.

tkuldeep17’s picture

Status: Needs work » Needs review

@mandar.harkare Thanks for reviewing my first module. I have fixed issued raised by you. But still I am seeing error pareview.sh. and not able to resolve it. So please help me here.

tkuldeep17’s picture

Issue summary: View changes
mandar.harkare’s picture

Kuldeep,
Every time you commit your code, visit the above link, click on Repeat Review and click on Submit Branch button (make sure URL to your git repository is mentioned there).

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

tkuldeep17’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
tkuldeep17’s picture

Issue summary: View changes
tkuldeep17’s picture

Issue summary: View changes
mpdonadio’s picture

Assigned: Unassigned » mpdonadio

Assigning to myself for next review.

mpdonadio’s picture

Assigned: mpdonadio » Unassigned
Status: Needs review » Postponed (maintainer needs more info)
Duplication
This sounds like an duplicate of the existing Amazon SES project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the Amazon SES issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

If that fails for whatever reason please get back to us and set this back to "needs review".

PA robot’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

tkuldeep17’s picture

Assigned: Unassigned » tkuldeep17
Status: Closed (won't fix) » Needs work
tkuldeep17’s picture

Issue summary: View changes

Updated module description.

tkuldeep17’s picture

Status: Needs work » Needs review
klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

Looks like you you have not addressed the duplication question - people can just use https://www.drupal.org/project/smtp and set Amazon as SMTP server? Looks like your project page is not accurate?

tkuldeep17’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs review

Hi klausi,

Thanks for reviewing. I have updated module description once again, please see "Similar Module" and "Advantage of this Module" section. above, hope it will fix duplication problem.

klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

The project page is wrong - you don't need to setup your own SMTP server, you can just set Amazon as your SMTP server. So you just have to set the credentials with the smtp module and you are all set, correct?

tkuldeep17’s picture

Hi klausi,
No, If you uses this module, you don't need to bother about smtp server not even Amazon as smtp server. Amazon SES sends mail in two ways:

  • SMTP Server
  • Direct API calling

so my module is using second method. You just need to enter AWS credentials which are required for using any Amazon service.

tkuldeep17’s picture

Status: Postponed (maintainer needs more info) » Needs review
klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

Yes, so it seems we already have a module which is working just fine with Amazon SES: the smtp module. Is there any benefit in using your module?

tkuldeep17’s picture

hi klausi:

Thanks for replying..

If anyone sends mail by Amazon SES via SMTP interface, there are more configuration which has to done.
1. Client software that can communicate using Transport Layer Security (TLS). and so more. For detail please refer here.
And these configuration has to be done in Amazon UI interface.

Benefits of this module over smtp:
1. But in my module there is very less configuration, just need AWS credentials
2. It sends the mail by calling direct Amazon SES API.
3. Provides interface for verifying identities, list identities, DKIM settings and sending mail statistics.

PS: Above settings can be configured by Amazon UI. But I am providing simple drupal interface for it.

Future Scope:
1. After this release I am planing to show Feedback on mail i.e. who has read mail, who spammed it, who have not received yet.
2. Will show mail statistics in better graphics way.
3. Integrate with simple newsletter module.

tkuldeep17’s picture

Status: Postponed (maintainer needs more info) » Needs review
klausi’s picture

Assigned: tkuldeep17 » Unassigned
Status: Needs review » Needs work
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch (commit 63cf8d0):

  • Bad line endings were found, always use unix style terminators. See https://www.drupal.org/coding-standards#indenting
    ./amazon_mail_service.install:            PHP script, ASCII text, with CRLF line terminators
    amazon_mail_service.install
    
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/amazon_mail_service.install
    ---------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------
     1 | ERROR | [x] End of line character is invalid; expected "\n" but found
       |       |     "\r\n"
    ---------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. Please add the differences to the SMTP module to the project page, so that users can make an educated decision what module fits their use case best when connecting to Amazon SES.
  2. Instead of creating a new project I think we should move your code into the existing amazon_ses project namespace. It would be just even more confusing for end users if there would be 3 projects that deal with Amazon SES, so let's reduce it to 2 by moving this into amazon_ses. Please follow the abandoned project process to get access to the repository and push your code into a 7.x-2.x branch. You will also have to rename your module's functions to amazon_ses.
  3. amazon_mail_service_form_alter(): if you are targeting only one form you should use hook_form_FORM_ID_alter() instead. See https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
  4. amazon_mail_service_form_alter(): why do you alter your own form provided in your module? You can just add that to the form building function? Please add a comment.
  5. "t('Request to !action action of Amazon SES API call has failed, missing some parameter or Request is not valid.', array('!action' => "GetIdentityDkimAttributes",));": the !action placeholder is useless here since it is not a variable but always a static string? So you can just use it directly in the message?
  6. "if (($form_state['clicked_button']['#value']) == 'Send Request') {": this will fail if the button label value is translated to another language, right? Also elsewhere.
  7. amazon_mail_service_verify_email_identity_amazon(): that function is not called anywhere, or am I missing something?
  8. amazon_mail_service_verify_email_identity_amazon(): you should use the "@" placeholder instead of "!" for user provided text in t() strings, make sure to read https://www.drupal.org/node/28984 again.
  9. amazon_mail_service_verify_sender_id_form_validate(): instead of checking if the identity_email is empty you should use the #required property on the form element in amazon_mail_service_verify_sender_id_form(). See https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
  10. amazon_mail_service_identity_list_form_submit(): why do you have to sleep() here for one second? Does the API otherwise give an error or what is the reason? Please add a comment.
  11. amazon_mail_service_get_mail_statistics_form(): this looks vulnerable to XSS exploits. $result_quota is coming from a third party service and therefore must be treated as user provided input. You need to sanitize it with "@" or "%" placeholders in t() instead of "!". Also elsewhere, just use "@" placeholders for most cases.
  12. amazon_mail_service_domain_dkim_enable_form(): The $header values are user facing text and must run through t() for translation.
  13. "if (($form_state['clicked_button']['#value']) == 'Filter') {": instead of checking the clicked button you should register your submit callbacks with the desired form submit element so that it is triggered automatically when the button is clicked. See https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

tkuldeep17’s picture

@klausi: Thanks a lot.
I will update my code as per your guidelines. And update this issue ASAP.. :-)

Ryan Palmer’s picture

@tkuldeep17 has requested maintainer access to the amazon_ses module, which I discontinued development on due to there being better support for SMTP email sending (this is probably still the case, IMO). Using Amazon SES via SMTP does not require "your own SMTP server", but this point might be lost in translation. If he can resolve the issues outstanding with his submission, I'll be happy to grant it.

tkuldeep17’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

Adding tag "PAReview: review bonus" again and updated issue with my more three module reviews.

tkuldeep17’s picture

Status: Needs work » Needs review

@klausi: According to your feedback, I have updated my code. Module name is also rename with namesapce amazon_ses.
Test case has to be written yet. I will write ASAP.

@ryan: My module does not send mail via Amazon SES SMTP interface. Thats why module module does not require SMTP configuration. It sends mail by directly calling SES API.

klausi’s picture

Status: Needs review » Needs work

Review of the 7.x-1.x branch (commit d2791c2):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/README.txt
    ------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------
     41 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
     41 | ERROR   | [x] Expected 1 newline at end of file; 0 found
    ------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. project page: "SMTP requires an SMTP server to be configured." as repeated multiple time this is imply wrong. No SMTP server needs to be configured, because Amazon will be the SMTP server. Please change that to "SMTP module: sends mails via SMTP to Amazon SES" or similar.
  2. amazon_ses_form_amazon_ses_domain_dkim_enable_form_alter(): doc block is wrong, this is hook_form_FORM_ID_alter().
  3. amazon_ses_get_identity_list(): the $header entries are user facing text and must run through t() for translation.
  4. amazon_ses_domain_dkim_enable_form(): HTML tags such as the br tags at the should be outside of t() where possible.
  5. AmazonSesSystem::mail(): the amazon_ses_send_request() call here has a third parameter which does not exist on amazon_ses_send_request()?
  6. amazon_ses_form_amazon_ses_domain_dkim_enable_form_alter(): the $result from amazon_ses_send_request() is directly printed to HTML here and it is not sanitized in amazonses.class.php either. Content received from a third party service must be treated as untrusted user supplied text and therefore must be sanitized before printing to HTML. Make sure to read https://www.drupal.org/node/28984 again. Please check all data that you receive and how it is printed. Since it is quite difficult for an attacker to exploit this vulnerability (hack Amazon or hack network traffic) I'm not adding the security tag here, but this should be fixed in any case.

Otherwise I think this is close to ready.

@Ryan Palmer: can you grant tkuldeep17 access in the meantime so that he can push the code to the amazon_ses project?

tkuldeep17’s picture

Issue summary: View changes
tkuldeep17’s picture

Status: Needs work » Needs review

Hi klausi:
Thank you so much for reviewing module so closely. :-)
I have updated code according to your feedback.

klausi’s picture

Status: Needs review » Needs work

Cool, please move the code now into the amazon_ses repository.

naveenvalecha’s picture

can we transfer ownership of Ryan's module to @tkuldeep17 #2432593: Offering to maintain Amazon SES. We have added him as co-maintainer to move this process along.

naveenvalecha’s picture

Status: Needs work » Active
klausi’s picture

Issue summary: View changes
Status: Active » Needs review

Code is in the amazon_ses repository, so let's continue here.

tkuldeep17’s picture

@naveenvalecha @klausi: So much thanks for your guidance and quick response.

Now I have moved code to amazon_ses repo. So my sandbox module https://www.drupal.org/sandbox/tkuldeep/2311697 is now useless. So should I delete it. Please assist me what to do next.?

klausi’s picture

Yes, you should delete the old sandbox now to avoid confusion.

klausi’s picture

Assigned: Unassigned » naveenvalecha
Status: Needs review » Reviewed & tested by the community

Git errors:

But otherwise looks good to me now!

Assigning to naveenvalecha as he might have time to take a final look at this.

naveenvalecha’s picture

Assigned: naveenvalecha » Unassigned
Status: Reviewed & tested by the community » Fixed

Read efbd3ad...

  1. amazon_ses.install : Please add a comment on the project page that after enabling this module it will override then it will override the default mail system and start using AmazonSesSystem
  2. There is still a master branch exists.Please make a liasie with prevoius maintainer(Ryan) and then remove the master branch.
  3. amazon_ses_get_identity_list :
      $form['amazon_list_identities_filter']['select_indentity'] = array(
        '#type' => 'select',
        '#title' => '',
        '#options' => array(
          'EmailAddress' => t('Email Address'),
          'Domain' => t('Domain'),
        ),
        '#default_value' => array($identity_type),
      );

    directly pass the default value instead of passing through array because we don't have multiples enabled in select list.

  • hook_help is missing in module.It would be nice to add it.
  • Readme.txt is nice.
  • No Blocker..

    Thanks for your contribution, tkuldeep17!

    I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

    Here are some recommended readings to help with excellent maintainership:

    You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

    Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

    Thanks to the dedicated reviewer(s) as well.

    tkuldeep17’s picture

    Thanks @klausi @naveenvalecha @ryan @mandar.harkare helping me..

    @klausi @naveenvalecha: I will follow your feedback and suggestions. :-)

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.