You are here

function amazon_ses_verify_sender_id_form in Amazon SES 7.2

Same name and namespace in other branches
  1. 7 includes/amazon_ses.admin.inc \amazon_ses_verify_sender_id_form()

Form for sending request to verify sender identity.

1 string reference to 'amazon_ses_verify_sender_id_form'
amazon_ses_menu in ./amazon_ses.module
Implements hook_menu().

File

includes/amazon_ses.admin.inc, line 37
Administration menu callbacks for amazon_mail_service.

Code

function amazon_ses_verify_sender_id_form($form, &$form_state) {

  // Verify if User has provided AWS credential, if not then force him to
  // provide that as without aws credential this we can't talk with amazon ses.
  $form['amazon_ses_service'] = array(
    '#type' => 'fieldset',
    '#title' => t('Verify sender identity'),
    '#collapsed' => FALSE,
  );
  $form['ajax_region'] = array(
    '#prefix' => '<div id = "amazon-identity-setting-form-wrapper">',
    '#suffix' => '</div>',
  );
  $form['amazon_ses_service']['identity_type'] = array(
    '#type' => 'radios',
    '#title' => t('Please Select Identityfication Type'),
    '#options' => array(
      'EmailAddress' => t('Email Address'),
      'Domain' => t('Domain Name'),
    ),
    '#attributes' => array(
      'class' => array(
        'container-inline',
      ),
    ),
    '#required' => TRUE,
    '#description' => t('To maintain trust between
      <strong>ISPs</strong> and <strong>Amazon SES</strong>, Amazon SES needs to
      ensure that its senders are who they say they are.'),
  );
  $form['amazon_ses_service']['identity_domain'] = array(
    '#type' => 'textfield',
    '#title' => t('Fully Qualified Domain Name'),
    '#size' => 60,
    '#description' => t('You must verify each email address that will be used as
      a <strong>From</strong> or <strong>Return-Path</strong> address for your
      messages.') . '<br/>' . t('The entire email address is <strong>
      case-sensitive</strong>.') . '<br/>' . t('Until you are granted production
      access to Amazon SES, you must also verify the email address of every
      recipient except for the recipients provided by the Amazon SES mailbox
      simulator.') . '<br/>' . t('<strong>Important:</strong> In order to
      complete verification, On success full sending this request you will get a
      token or a TXT record that must be placed in the DNS settings for the
      domain.'),
    '#prefix' => '<div class = identity-domain-class>',
    '#suffix' => '</div>',
    '#states' => array(
      'visible' => array(
        ':input[name="identity_type"]' => array(
          'value' => 'Domain',
        ),
      ),
    ),
  );
  $form['amazon_ses_service']['identity_email'] = array(
    '#type' => 'textfield',
    '#title' => t('Email Address'),
    '#size' => 60,
    '#description' => t('When you verify an entire domain, you are verifying all
      email addresses from that domain, so you dont need to verify email addresses
      from that domain individually.') . '<br/>' . t('Domain names are <strong>
      case-insensitive</strong>.') . '<br/>' . t('<strong>Important:</strong>
      Amazon SES only verifies fully qualified domain names (FQDNs). Even if you
      verify a domain, you have to verify subdomains of that domain. For example
      , if you want to send email from both example.com and newyork.example.com,
      you need to verify each of these FQDNs separately.'),
    '#prefix' => '<div class = identity-email-class>',
    '#suffix' => '</div>',
    '#states' => array(
      'visible' => array(
        ':input[name="identity_type"]' => array(
          'value' => 'EmailAddress',
        ),
      ),
    ),
  );
  $form['amazon_ses_service']['send_request'] = array(
    '#type' => 'submit',
    '#value' => t('Send Request'),
  );
  return $form;
}