wordpress,email,amazon-web-services,beanstalk,elastic , Email issues with Wordpress running on AWS Elastic Beanstalk


Email issues with Wordpress running on AWS Elastic Beanstalk

Question:

Tag: wordpress,email,amazon-web-services,beanstalk,elastic

I'm running Wordpress 4.2 on AWS Elastic Beanstalk. I'm using a plugin that sends emails using the WP email API, which uses the server's (i.e. Elastic Beanstalk's) internal mail system.

The problem: emails that the app attempts to send to my university email (let's call it .uni.edu) fail, and they do work when sent to my standard gmail.

What's interesting is that I have no issues running the same application locally. The emails associated with the app send fine -- so obviously there's some issue with the way Elastic Beanstalk in particular is attempting to relay the messages to the .uni.edu server. Perhaps the .uni.edu server is picking it up as spam (when sent from Elastic Beanstalk, not when being sent through my local system) and bouncing it back, but I'm not experienced enough to diagnose this.

Does anyone have suggestions for either directly applying some kind of fix to this problem, or creating some sort of setup that is a workaround (e.g. setting something up on Elastic Beanstalk to send emails in a non-default way that is less likely to have issues working with the university email server)?

Here's a log from /var/mail:

From [email protected]  Fri Apr 24 21:39:52 2015
Return-Path: <[email protected]p-172-31-41-109.ec2.internal>
Received: from localhost (localhost)
    by ip-172-31-41-109.ec2.internal (8.14.4/8.14.4) id t3OLdq1k026047;
    Fri, 24 Apr 2015 21:39:52 GMT
Date: Fri, 24 Apr 2015 21:39:52 GMT
From: Mail Delivery Subsystem <[email protected]>
Message-Id: <[email protected]>
To: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
    boundary="t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal

The original message was received at Fri, 24 Apr 2015 21:39:42 GMT
from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<[email protected]>
    (reason: 553 5.1.8 <[email protected]>... Domain of sender address [email protected] does not exist)

   ----- Transcript of session follows -----
... while talking to apathy.uni.edu.:
>>> MAIL From:<[email protected]> SIZE=1191
<<< 553 5.1.8 <[email protected]>... Domain of sender address [email protected] does not exist
501 5.6.0 Data format error

--t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal
Content-Type: message/delivery-status

Reporting-MTA: dns; ip-172-31-41-109.ec2.internal
Received-From-MTA: DNS; localhost
Arrival-Date: Fri, 24 Apr 2015 21:39:42 GMT

Final-Recipient: RFC822; [email protected]
Action: failed
Status: 5.1.8
Diagnostic-Code: SMTP; 553 5.1.8 <[email protected]>... Domain of sender address [email protected] does not exist
Last-Attempt-Date: Fri, 24 Apr 2015 21:39:52 GMT

--t3OLdq1k026047.1429911592/ip-172-31-41-109.ec2.internal
Content-Type: message/rfc822

Return-Path: <[email protected]>
Received: from ip-172-31-41-109.ec2.internal (localhost [127.0.0.1])
    by ip-172-31-41-109.ec2.internal (8.14.4/8.14.4) with ESMTP id t3OLdg1k026045
    for <[email protected]>; Fri, 24 Apr 2015 21:39:42 GMT
Received: (from [email protected])
    by ip-172-31-41-109.ec2.internal (8.14.4/8.14.4/Submit) id t3OLdgcq026044;
    Fri, 24 Apr 2015 21:39:42 GMT
To: [email protected]
Subject: [classifiedads] Password Reset
X-PHP-Originating-Script: 498:class-phpmailer.php
Date: Fri, 24 Apr 2015 21:39:42 +0000
From: WordPress <[email protected]>
Message-ID: <[email protected]talk.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Someone requested that the password be reset for the following account:

http://classifiedads-test.elasticbeanstalk.com/

Username: univstudentseas

If this was a mistake, just ignore this email and nothing will happen.

To reset your password, visit the following address:

<http://classifiedads-test.elasticbeanstalk.com/wp-login.php?action=rp&key=dzaUvJpcjAe243gNOysZ&login=univstudentseas>


--t3OLdq1k026047.1429911592/ip-179-35-41-109.ec2.internal--

Answer:

This sounds very similar to another recent question about email:

http://stackoverflow.com/questions/29808262/unable-to-send-emails-from-linux/29810884#29810884

Does your ec2 instance have an associated external DNS? Is there a public IP associated with it. You'll need to apply some type of fix so that your outgoing email message has a domain other than [email protected]


Related:


Run AJAX function on form submit button after javascript confirm() cancel


javascript,jquery,ajax,wordpress,forms
I have a form where and AJAX function runs on form submission to make sure that the data in the form doesn't conflict with data in the database. If a conflict is found, the AJAX function pops up a confirm() box. If the user clicks "OK", the form is submitted....

login with username or email in wordpress


wordpress
I am working on login template...but I want to make login with username as well as email.I got code with for that but it is not worked,it is as follow: function login_with_email_address($username) { $user = get_user_by('email',$username); if(!empty($user->user_login)) $username = $user->user_login; return $username; } add_action('wp_authenticate','login_with_email_address',10,1); I already put action in 'authenticate'...

woocommerce - make order notes required


wordpress,woocommerce
is it posible to make woo 'order_comments' field required - and show message If the field is not filled I have tried the following code but I can not get it to work. add_action('woocommerce_checkout_process', 'my_custom_checkout_field_process'); function my_custom_checkout_field_process() { // Check if set, if its not set add an error. if...

JavaMail MimeMessage.getContent unsupported encoding


email,encoding,javamail
I´m having a problem with parsing some type of mail encoding with charset=t.101-g2 I´m using JavaMail in Grails directly using the lib, getting the unread emails from IMAP, and for each message try to get the content with Object msgContent = msg.getContent() And that line is throwing the error. The...

Woocommece login URL


wordpress,woocommerce
I have a custom page for login in Wordpress with Woocommerce integrated, and need that when a user click on my-account page, instead of using the login form from woocommerce, redirect to my custom login url. my-account page only must be seen in case the user is logged in,else, I...

String indices must be integers, new to python


python,wordpress
I hope I won't get trashed for this question. This is my first day with Python and all I've done so far is copy pasting and deducing from other snippets of code. I have no experience with code. I'm trying my hardest however this one I can't get past for...

Wordpress page can't continue due to this error


php,css,wordpress,wordpress-plugin,wordpress-theming
I just faced this problem recently, I don't what causes it . But I need help fixing it. The error are : http://www.udesign.my/aaf4/wp-admin/admin-ajax.php?action=woocommerce_checkout Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://fonts.googleapis.com/css?family=century+gothic+:300,400 Failed to load resource: the server responded with a status of...

Send email with body consisting of objects


email,powershell,foreach
I am trying to write a script to search through AD and look for any stale computers and then sends an email to me. However, there are 3 requirements: get the lastlogondate for any pc that is older than 90 days once I get that list, I do a ping...

Sending mail by Unauthorised sender in Google AppEngine


python,google-app-engine,email,sendmail
I've got a Google AppEngine Python application connected with my domain. I want to be able to send emails from any email, like: [email protected] So I use sendmail() and set mailobject.sender = "[email protected]", but it does not work. Also I made a receive function, but I don't want to receive...

Wordpress log out using URL and redirect to specify page


javascript,php,wordpress
I have one Wordpress installation . i need to log out the user without any indication user is coming from particular URL.Is it possible? My code: <?php if($_GET['logout'] == 1) { $redirect_to = current_page_url(); ?> <script> window.location.href="<?php echo wp_logout_url( $redirect_to ); ?>"; </script> <?php } ?> I am using above...

PHP - how to send e-mail after successful file upload? [duplicate]


php,email,file-upload
This question already has an answer here: PHP mail form doesn't complete sending e-mail 10 answers I need a PHP to send an email if a file was uploaded successfully. My code is working fine like this: <?php $target_dir = "gallery-sys/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1;...

Wordpress Custom Post Type categroies


wordpress,custom-post-type,advanced-custom-fields
I have a custom post type called STORIES. When a user adds a new STORY, I need them to be able to assign a category (or multiple categories) to the post so I can sort them later by category. To do this, I only want specific categories I assign to...

wp_schedule_event hook sheduled but not working


php,wordpress,cron,wordpress-plugin,cron-task
I'm trying to trigger cron job from WordPress Plugin that I'm writing (It's gonna take all new Products and export them to CSV every day) so the problem is that when I'm put this code in functions.php all working great and the code is valid but from the plugin folder...

How do I use VB.NET to send an email from an Outlook account?


vb.net,email
I'm trying to send an email via an outlook email account through a vb.net program. When I run the code I get an error telling me that I don't have a secure connection. I've been searching online and have tried all the adjustments I've found but I'm still not having...

CSS mystery: why the extra height in my div's?


javascript,css,wordpress
I'm just starting in on a new site and am getting extra space at the top of the div's I'm building for the home page. Using Safari's Web Inspector, I've eliminated any obvious padding or margins being responsible; but it's also seemingly telling me that the height of the div's...

Creating complex queries with WP_Query in Wordpress


wordpress,wp-query
Here's a complex query which we've built using WP_Query. It should: Ignore post id 191 AND Select all posts with 'reihenfolge' <= 18 AND Ignore posts without a featured image AND Order them randomly Here is the code: $args_projekte = array( 'post_type' => 'projekt', 'posts_per_page' => 18, 'meta_query' => array('relation'...

Excluding certain pages from being redirected to https


wordpress,.htaccess,redirect,https,http-redirect
I'm using the following rules on my WordPress website to: Redirect all http pages to https Redirect the careers page to http <IfModule mod_rewrite.c> RewriteEngine On # Go to https if not on careers RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/careers$ [NC] RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R,L] # Go to http if...

Wordpress function to effect only one (custom) post type, and not every post


wordpress,custom-post-type
I'm having an issue with a custom post type (WP Job Manager). I am using the following code in my functions file to 'add a default image to posts that have no image attached'. function custom_default_cover_image( $image, $args ) { global $post; if ( $image ) { return $image; }...

Text-decoration/CSS causing text to move


html,css,wordpress
I've tried a bunch of techniques to solve this. I've used float (left/right) and played with positioning (absolute & relative). None worked. Basically my navigation keeps moving when the the text decoration (font-weight: bold; in this case) is applied. I'm new to CSS and this is my first header- so...

Bxslider, Custom Fields & Wordpress


php,wordpress,bxslider
Good Afternoon, can anyone explain how i can achieve two things with the existing code below: Remove the null values, as these are exporting bxslider items that have broken links For some reason two versions of each image in the the pager are showing. Can anyone see why and how...

Add second single product page in Woocommerce


wordpress,woocommerce
Is it possible to add a second single product page in Woocommerce? So basically when I am at the single product page I click the "next" button and I get directed to the same single product page with another template. So I just want to retrieve the same data on...

Two language site in wordpress what i can do [on hold]


wordpress
I want to create 2 language site in word press. I am pretty new in word press. so what can i do. I will have 2 different theme for each language or do something else. The English is for left to right while Arabic is for right to left. So...

BeautifulSoup: Parsing bad Wordpress HTML


python,html,regex,wordpress,beautifulsoup
So I need to scrape some a site using Python but the problem is that the markup is random, unstructured, and proving hard to work with. For example <p style='font-size: 24px;'> <strong>Title A</strong> </p> <p> <strong> First Subtitle of Title A </strong> "Text for first subtitle" </p> Then it will...

Wordpress End If Statements


php,wordpress,woocommerce
Apologies, PHP is not my strongest area so this might seem super easy to others. I am trying to implement a statement to say, when there is something in my WooCommerce Cart to show the cart. If there's nothing in the cart then show nothing. The code I have so...

How to send a mail by postfix mail server with rails?


ruby-on-rails,email,mailer
On my local host, I followed this article made a mail server and it works well. https://www.digitalocean.com/community/tutorials/how-to-install-postfix-on-centos-6 I want to develop a mailer feature with rails framework. Here are my settings: # mailer config.action_mailer.default_url_options = { :host => 'example.com' } config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: 'localhost', port: 25,...

Can not link the author


wordpress
I am Making a blog site. I want to show all posts of a user by linking with his/her user name. But it's not working. My code is by <a href="<?php get_author_posts_url(get_the_author_meta('ID'));?>"><?php the_author();?></a> What's wrong with it actually?...

ACF Multiple Map Markers


wordpress,google-maps,google-maps-api-3,acf
I'm using Advanced Custom Fields and want to pull in the field called 'location' to display some locations on a map. How would i adjust the following code to display multiple markers from my location field? The format of the custom field is like so: echo 'Location: ' . get_field('location');...

Foundation and Wordpress blank spaces


wordpress,zurb-foundation
Anyone has an idea about the blank spaces that I'm getting in a while loop with wordpress using foundation framework? <div class="large-8 columns"> <?php query_posts(array('category_name' => 'revista', 'paged' => get_query_var('paged'), 'posts_per_page' => 9 )); ?> <?php while ( have_posts() ) : the_post(); ?> <article class="boletin large-4 columns" style="min-height:1px;"> <a href="<?php...

How to fetch the page id and use it for an image name


php,wordpress
I am new in php. I want to make a condition for showing page id and set my image name is pageId and show this background image in my header banner. How to fetch page id use it fetching image for my banner background img. Here is my code: <div...

How to crop image from center using wp_image_editor


wordpress,image,wordpress-plugin,resize-crop,wp-image-editor
I am working on WordPress plugin. In plugin the user upload images from meta field and in back end i use wp_image_editor for cropping and re sizing the images. The images re sized very well but on cropping the images not cropped very well. I give x-dimension 100 and y-dimension...

How to call posts from PHP


php,wordpress,caching,cron,call
I have a website, that uses WP Super Cache plugin. I need to recycle cache once a day and then I need to call 5 posts (URL adresses) so WP Super Cache put these posts into cache again (caching is quite time consuming so I'd like to have it precached...

How to exclude posts without featured images from custom post type WP_Query


wordpress,wp-query
We have the following WP_Query which collects all custom posts (except id=191) and lists them randomly: $args_projekte = array( 'post_type' => 'projekt', 'posts_per_page' => 18, 'post__not_in' => array(191), 'orderby' => 'rand', ); $query_projekte = new WP_Query($args_projekte); How do we extend this to ALSO exclude all posts WITHOUT featured images? Thanks...

Changing font-size of
  • on wordpress

  • css,wordpress,html-lists
    I am adding some pages on a wordpress themed website. There is a table with 3 columns: 1st column will be the title (larger font). Since it looks better and editing is easier, I started using <ul> instead of <td> Even though it works fine on JSFIDDLE font-size on the...

    Accessing shared outlook inbox in python


    python,email,outlook
    I have a shared inbox in outlook and I want to write some code that would get me the emails from the shared inbox. Right now I can get the emails from my main inbox, but I want to do it for another inbox. This is the code so far:...

    How to add image slider in email newsletter?


    javascript,jquery,html,email,newsletter
    I have been created email newsletter using mailchimp Now i want to add image slider with responsive design, But i have been searched lot online.. Some online docs says can't able to add image slider in email newsletter. For example this link told., its impossible. So, may i know, what...

    need wordpress plugin to show 3 type of different kind of text, image and 2 buttons


    wordpress,plugins,wordpress-plugin
    I have slider image on http://techturners.com/arman-badwal/ page in "featured work" section. I need plugin to create dynamic slider like image in section.I use many sliders like cyclone-slider but they show only title, description and image.

    How to enable mod_rewrite on Apache 2.4?


    php,wordpress,apache,mod-rewrite,centos7
    I'm using Wordpress and wanted to enable pretty urls feature, but they don't work, i'm thinking that it's because of mod_rewrite, but i don't know how to enable it on Apache 2.4 under CentOS 7... I've already try this: grep -i LoadModule /etc/httpd/conf/httpd.conf | grep rewrite but nothing... Also would...

    CSS disable horizontaly scrolling - Wordpress [on hold]


    php,html,css,wordpress,responsive-design
    Hi im working on a wordpress blog and have the following problem: http://www.catlovers.co/17-cat-reactions-that-sum-up-your-love-life/ If i resize the browser (X-Axies) to a minimum like surfing on a mobile device i am able to scroll to the right in the Contend section (hold down middle mouse button). How can i change my...

    Laravel 4.2 Sending email error


    php,email,laravel,laravel-4
    Hello everyone I have an error in laravel when I am sending an email. I have a form with a select tag and when I select the user and click submit I need to send him a mail after I select it. Here is my Controller method: public function store()...

    How do I send an email of the current page using a button?


    javascript,php,html,email,xampp
    I am trying to send an email of my html page. This is the code I have so far: <script language="javascript"> function emailCurrentPage() { window.location.href = "mailto:?subject=" + document.title + "&body=" + encodeURI(document.location); } </script> <button onclick="emailCurrentPage()">Email page</button> Which sends the link of the current page but I want the...

    WordPress expanding grid with thumbnail


    javascript,css,wordpress,grid,expand
    I'm using codrops solution to display team members in an expanding grid: http://tympanus.net/codrops/2013/03/19/thumbnail-grid-with-expanding-preview/ I was already able to change some code to display my post thumbnail in the grid preview. However, I want to display the same picture in full size in the expanded view. In the original version it...

    WooCommerce seems to only orderby date and not price


    php,ajax,wordpress,woocommerce
    I am loading in variable products via a custom WP_Query $args = array( 'post_type' => 'product', 'posts_per_page' => 100, 'product_cat' => 'beast-balls', 'orderby' => 'date', 'order' => 'desc' ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); ?> <div class="product-node cat-beast-balls">...

    Mail with html content shows break lines or ignores newlines


    email,templates,go,mandrill
    I am sending mail to users via mandrill and I using both smtp and mandrill api to send. Content of the mail is rendered go template (.tpl) When I put template like Hi {{.name}}, <br/> This is support. <br/> it sends via mandrill api ok, but is visible when I...

    How to exclude guest users from getting emailed Rails 4 Devise


    ruby-on-rails,email,ruby-on-rails-4,devise,mailer
    Just set up my first mailer on Rails 4. I have a welcome email sent to new users as soon as they sign up (create) for a new account using devise. I also have devise set up so that if a current_user is not found, a guest user will be...

    PHPMailer not sending e-mail through Gmail, returns blank page


    php,email,gmail,phpmailer,send
    I am trying to set up a contact form at the bottom of my page. I am using PHPMailer and trying to receive emails at my gmail account. Every time I submit the form, my url changes to url/email.php and I get a blank page. What am I doing wrong?...

    Coding after Wordpress loop not showing


    php,wordpress
    I have been working on a custom archive page but I have run into some trouble. The pagination is shifting down into the footer area. I have gone through my code several times and I cannot work out why this is happening. If I remove the loop, the template works...

    Codeigniter PHP Mailer, Sender Info


    php,email,codeigniter-2,phpmailer,contact-form
    I'm using Codeigniter PHP Mailer which is hosted here: https://github.com/ivantcholakov/codeigniter-phpmailer/ and with gmail smtp it works flawless. However,using it for a standard contact form, when visitors use that contact form and send us an email, they basically send mails from our mail address to our another mail addess. When they...

    How do you unblock the 993 port if your firewall settings is blocking it?


    php,email,ssl
    I am trying to retrieve my emails from Gmail using php. for writing the host name, this is my code: $hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; I am getting this error: Warning: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home1/mtc/public_html/mtcerp/emailparser/email.php on line 10 Cannot connect to Gmail: Can not authenticate to IMAP server: [CLOSED]...

    WooCommerce: How to display Category Name in single-product.php


    php,wordpress,woocommerce
    How can I display the category name in single-product.php? In archive-product.php the code is: <?php woocommerce_page_title(); ?> but what could I use to show the category name in the single-product.php that belong to the category?...

    How To check Product Have Variation in woocommerce


    php,wordpress,woocommerce,product
    Is there any way to check the product has variation something like Please help me. <?php If (product has variation) { echo"This Product have Variations "; } else { echo "This Product does not have Variations "; } ?> ...