You are here

function amazon_ses_sender_configuration_form_validate in Amazon SES 7

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

File

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

Code

function amazon_ses_sender_configuration_form_validate($form, &$form_state) {
  $values = $form_state['values'];
  if (!empty($values['amazon_ses_reply_to']) && !valid_email_address($values['amazon_ses_reply_to'])) {
    form_set_error('amazon_ses_reply_to', t("The reply to address you supplied is not valid."));
  }
  if (!empty($values['amazon_ses_return_path']) && !valid_email_address($values['amazon_ses_return_path'])) {
    form_set_error('amazon_ses_return_path', t("The return path address you supplied is not valid."));
  }
}