logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
IDAutomation  
#1 Posted : Friday, November 13, 2020 9:57:47 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Hello, I hope you can help us to resolve this issue with the Contact Form on our website. The Contact Form is supposed to allows users to send a message to our main email if they have a question. They receive a contact confirmation email that says we will follow up with them, and we reply to their original email. This is not how our Contact Form is workin.

Instead, the Contact Form only completes the send to our main account if the email address entered in the appropriate field is one that is registered with our system. These emails arrive to us with their request. However, if ANY email is entered that is NOT already in our system, they receive a confirmation email but we never receive their initial form request.

I have searched through virtually every setting I can think of, and I would really appreciate your assistance. This is accounting for nearly half of the total emails we receive from the Contact Form, and essentially restricts potential new customers from being able to send us an email. Please help!

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyartiwana25816656  
#2 Posted : Friday, November 13, 2020 11:19:10 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I did some tests and confirmed that the contact us form is working as expected. I am unable to reproduce the case which you described above.

I can get emails from both users that are already registered and the users which are not registered.

Can you please once again review the Admin/Email/Settings configurations? What is your store default email address?
IDAutomation  
#3 Posted : Friday, November 13, 2020 11:26:42 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
I can certainly review my settings. Can you tell me what the proper configurations would be so I can be sure to match that in our settings? I am unable to post an image and don't feel particularly comfortable doing that as it is. I can tell you that our store default email address is admin@idautomation.com .
shaharyartiwana25816656  
#4 Posted : Monday, November 16, 2020 2:10:55 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Can you please confirm that you are getting a test email when you use the Test email field on the email settings page.

What I can understand is that you are getting emails (from contact form) from users that are already registered in your database and you are not getting emails from the users that access the contact form without logging in.

I am unable to reproduce this issue. I am getting emails from both the registered users and anonymous users as well.
judy at Web2Market  
#5 Posted : Monday, November 16, 2020 6:42:19 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Are your send to friend emails working OK? We have a Gold site where they stopped working because the hoster locked down email so that it sends emails only if the email address is the store's domain, as a security measure. Maybe that is what is happening with your contact form. On the send to friend email, the user enters his own email and the email is sent with them as the From:.
IDAutomation  
#6 Posted : Monday, November 16, 2020 9:37:15 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
We checked the error logs in our store and found that an error is being thrown every time the store tries to send the customers New Contact Message email. I've removed the customers email domain and replaced it with xxxx.com below:

Warn
Error sending email with subject 'New Contact Message'. View less
Exception: Mailbox unavailable. The server response was: 5.1.0 Sender is not allowed to send from XXXX.COM (R2) Stack Trace: at System.Net.Mail.DataCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse) at System.Net.Mail.DataCommand.Send(SmtpConnection conn) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at CommerceBuilder.Messaging.EmailClient.Send(MailMessage mailMessage, SmtpSettings smtpSettings, Boolean throwOnError)

Any idea why this error is occuring and how we can resolve it? Apparently the sender (idautomation store) is not allowed to send.
Katie S  
#7 Posted : Monday, November 16, 2020 11:44:55 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 472

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Good Morning,

I'm seeing other reports of email issues.

Is anyone using a Gmail server to send mail out through the AbleCommerce store?

Thank you,
Katie

Thanks for your support!

Katie
Secure eCommerce Software and Hosting
IDAutomation  
#8 Posted : Monday, November 16, 2020 3:02:56 PM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
We are not using a Gmail server to send mail out through the AbleCommerce store. The issue does appear to be originating in the store mechanism that sends this email. It does not reach our spam filters because nothing is sent.
jeffr_ca  
#9 Posted : Monday, November 16, 2020 3:23:59 PM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Yes, I am.

My 9.0.3 is not live, but is a test migration from 7.0.3

In 7.0.3 we have the Store Email address set as "info@domain.xyz" while the gmail account log in credentials is "jeff@domain.xyz"

In 9.0.3 these settings were migrated properly and seem to work in transaction email tests (order confirmation, shipping confirmation, etc.). Even the "Test Message" button works on the Configuration Page. But the contact page for some reason requires that the Store Email address setting must match the account log in setting.

If I try a contact page test with the Store Email setting as "info@domain.xyz" the message never arrives to our Admin email inbox.

As soon as I make the Store Email setting match the account log in address as "jeff@domain.xyz", the contact page emails arrive normally.

Hope this helps out....let me know if you need any further details.

-Jeff
shaharyartiwana25816656  
#10 Posted : Tuesday, November 17, 2020 2:02:59 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Can you please confirm that you are getting a test email when you use the Test email field on the email settings page.

What I can understand is that you are getting emails (from contact form) from users that are already registered in your database and you are not getting emails from the users that access the contact form without logging in.

I am unable to reproduce this issue. I am getting emails from both the registered users and anonymous users as well.


@IdAutomation

Coming back to your original issue. Can you please confirm this once again?

Thanks
shaharyartiwana25816656  
#11 Posted : Tuesday, November 17, 2020 2:11:11 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
If I try a contact page test with the Store Email setting as "info@domain.xyz" the message never arrives to our Admin email inbox.

As soon as I make the Store Email setting match the account log in address as "jeff@domain.xyz", the contact page emails arrive normally.


Hi Jeff,

I have confirmed the scenario and found that the contact form sends the email to the merchant on the address entered in the Store Email address field. If the email address is valid and email config settings are working properly, the merchant will get the email on the Store Email address.

In your case please confirm that "info@domain.xyz" is a valid email address.

default email.png (22kb) downloaded 0 time(s).
jeffr_ca  
#12 Posted : Tuesday, November 17, 2020 9:10:05 AM(UTC)
jeffr_ca

Rank: Advanced Member

Groups: Authorized User, Developers, Registered, HelpDesk
Joined: 1/7/2019(UTC)
Posts: 112

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Thanks for reviewing that.

It appears there may have been a bug in 7.0.3 that has been sending our contact emails for all these years despite incomplete email settings on Gmail.

I've included info@domain.xyz to our admin credentials account on Gmail as an extra "Send From" address and it now works properly in AC 9.0.3.

As far as I can see now, sending emails from Ablecommerce store using a Gmail server works fine.

-Jeff
IDAutomation  
#13 Posted : Tuesday, November 17, 2020 10:55:49 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: shaharyartiwana25816656 Go to Quoted Post
Quote:
Can you please confirm that you are getting a test email when you use the Test email field on the email settings page.

What I can understand is that you are getting emails (from contact form) from users that are already registered in your database and you are not getting emails from the users that access the contact form without logging in.

I am unable to reproduce this issue. I am getting emails from both the registered users and anonymous users as well.


@IdAutomation

Coming back to your original issue. Can you please confirm this once again?

Thanks


No, we are not getting any emails from the contact form, whether they are in our database or not. We are not getting ANY using the contact form. Just the auto-response thanking them for sending a message.
shaharyartiwana25816656  
#14 Posted : Tuesday, November 17, 2020 11:06:34 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
OK. So your first comment on this thread was the cause of confusion.

Now please confirm that from Admin => Configure => Email => Settings page:

1- You are able to see the success message using the Test email configuration option.
2- What is your Store Email? (Top left section of the page). Is this a valid email and are you receiving emails on this address?

The merchant should receive emails on this Store Email from the contact form if the email address is valid and the email configurations are valid.
IDAutomation  
#15 Posted : Tuesday, November 17, 2020 11:16:43 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: shaharyartiwana25816656 Go to Quoted Post
OK. So your first comment on this thread was the cause of confusion.

Now please confirm that from Admin => Configure => Email => Settings page:

1- You are able to see the success message using the Test email configuration option.
2- What is your Store Email? (Top left section of the page). Is this a valid email and are you receiving emails on this address?

The merchant should receive emails on this Store Email from the contact form if the email address is valid and the email configurations are valid.


1- Yes, I am able to see the success message using the Test email configuration option.
2- Our Store Email is admin@idautomation.com . This is a valid email. This is our main email address and we receive emails on this address from customers as well as other transactional emails from the store.

The only emails we do not receive to admin@idautomation.com that we should be receiving are from customers who attempt to contact us through the Contact Form.
shaharyartiwana25816656  
#16 Posted : Tuesday, November 17, 2020 11:26:48 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Which version of AC9 are you using? 9.0.3?
Is there any customization related to the contact form?

If possible can you please share the code from Website\Controllers\WebpageController.cs

Please share the code between these lines.
Code:
#region CONTACT US
...
#endregion
IDAutomation  
#17 Posted : Tuesday, November 17, 2020 11:37:23 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
We have Version: 9.0.2.6218

We haven't made any changes to this code:

#region CONTACT US
[RegisterWidget(DisplayName = "Contact Us Form", Category = CommerceBuilder.CMS.WidgetCategory.General, Description = "Generates a form to collect contact information from a user.")]
public ActionResult ContactUs(ContactUsWidgetParams parameters)
{
var model = new ContactUsModel();
User user = AbleContext.Current.User;
model.FullName = (string.IsNullOrEmpty(user.PrimaryAddress.FirstName) && string.IsNullOrEmpty(user.PrimaryAddress.LastName)) ? string.Empty : user.PrimaryAddress.FirstName + " " + user.PrimaryAddress.LastName;
model.Email = user.Email;
model.ShowCaptcha = parameters.EnableCaptcha;
model.parameters = parameters;
model.GoogleReCaptchaEnabled = AbleContext.Current.Store.Settings.GoogleReCaptchaEnabled;
return PartialView("_ContactUs", model);
}

[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult ContactUs(ContactUsModel model)
{
bool isSuccessful = false;
bool isFailure = false;
bool isMessagePanelVisible = false;
if (ModelState.IsValid)
{
if (model.parameters.EnableCaptcha)
{
string reCaptchaErrorMessage = string.Empty;
var isCaptchaValided = (AbleContext.Current.Store.Settings.GoogleReCaptchaEnabled ? GoogleReCaptchaHelper.Validate(Request.Form["g-Recaptcha-Response"], out reCaptchaErrorMessage) :
SecurityUtility.ValidateCaptcha(model.CaptchaInput, model.ChallengeText));

if (!isCaptchaValided)
{
//CAPTCHA IS VISIBLE AND DID NOT AUTHENTICATE
if (AbleContext.Current.Store.Settings.GoogleReCaptchaEnabled)
{
if (!string.IsNullOrEmpty(reCaptchaErrorMessage))
{
ModelState.AddModelError("ShowCaptcha", reCaptchaErrorMessage);
}
else ModelState.AddModelError("ShowCaptcha", LanguageManager.GetResource("retail.webpagecontroller.please_confirm_you_are_not_a_robot"));
}
else
{
ModelState.AddModelError("CaptchaInput", LanguageManager.GetResource("retail.webpagecontroller.you_did_not_input_the_verification_number_correctly"));
model.CaptchaInput = string.Empty;
}

return PartialView("_ContactUs", model);
}
}

// raise the contact us store event
StoreEventEngine.NewContactFormSubmitted(model.Email, model.FullName, model.Phone, model.Message);

// send the contact us email to merchant
Store store = AbleContext.Current.Store;
StoreSettingsManager settings = store.Settings;

MailMessage mailMessage = new MailMessage();

if (string.IsNullOrEmpty(model.parameters.SendTo))
{
mailMessage.To.Add(settings.DefaultEmailAddress);
}
else
{
mailMessage.To.Add(model.parameters.SendTo);
}

mailMessage.From = new System.Net.Mail.MailAddress(model.Email);
mailMessage.Subject = model.parameters.Subject;
mailMessage.Body += "Name: " + model.FullName + Environment.NewLine;
mailMessage.Body += "Email: " + model.Email + Environment.NewLine;
mailMessage.Body += "Phone: " + model.Phone + Environment.NewLine;
mailMessage.Body += "Comment: " + Environment.NewLine + model.Message;
mailMessage.BodyEncoding = System.Text.Encoding.UTF8;
mailMessage.IsBodyHtml = false;
mailMessage.Priority = System.Net.Mail.MailPriority.High;
SmtpSettings smtpSettings = SmtpSettings.DefaultSettings;

try
{
EmailClient.Send(mailMessage);

isSuccessful = true;
}
catch (Exception exp)
{
Logger.Error("ContactUs Control Exception: Exp" + Environment.NewLine + exp.Message);
isFailure = true;
}

isMessagePanelVisible = true;

// if confirmation email is enabled, send the confirmation email back to customer
if (model.parameters.EnableConfirmationEmail)
{
int emailTemplateId = model.parameters.ConfirmationEmailTemplateId;

// use default if none is provided
if (emailTemplateId == 0)
emailTemplateId = AbleContext.Current.Store.Settings.ContactUsConfirmationEmailTemplateId;

EmailTemplate template = _emailTemplateRepo.Load(emailTemplateId);

if (template != null)
{
template.Parameters.Add("user", AbleContext.Current.User);
template.Parameters.Add("store", AbleContext.Current.Store);

try
{

// populate the email for anonymous user account, it is needed for email message generation ('customer' parameter)
if (AbleContext.Current.User.IsAnonymousOrGuest)
AbleContext.Current.User.Email = model.Email;

MailMessage[] messages = template.GenerateMailMessages();
foreach (MailMessage msg in messages)
{
msg.To.Clear();
msg.To.Add(new MailAddress(model.Email));
Task.Run(() => EmailClient.Send(msg, smtpSettings));
}

isFailure = false;
isSuccessful = true;
}
catch (Exception exp)
{
Logger.Error("ContactUs Control Exception: " + Environment.NewLine + exp.Message);
isFailure = true;
isSuccessful = false;
}

isMessagePanelVisible = true;
}
}

model.IsSuccess = isSuccessful;
model.IsFailure = isFailure;
model.IsMessagePanelVisible = isMessagePanelVisible;
return PartialView("_ContactUs", model);

}
else
{
return PartialView("_ContactUs", model);
}
}

private string GetFromAddress()
{
StoreSettingsManager settings = AbleContext.Current.Store.Settings;
string fromAddress = settings.DefaultEmailAddress;
if (string.IsNullOrEmpty(fromAddress)) fromAddress = "admin@domain.xyz";
return fromAddress;
}

#endregion
shaharyartiwana25816656  
#18 Posted : Tuesday, November 17, 2020 11:56:17 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
The code is identical. I am able to see this working as expected.

One more thing to confirm.

Please run this query to see if the Store Email is stored correctly in the database.
Code:
select FieldValue from ac_StoreSettings where FieldName = 'Email_DefaultAddress'


Are there any error log entries when a contact form is submitted? Please confirm by submitting a contact form if there is a new error entry on the Error Log page.
IDAutomation  
#19 Posted : Tuesday, November 17, 2020 12:04:39 PM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: shaharyartiwana25816656 Go to Quoted Post
The code is identical. I am able to see this working as expected.

One more thing to confirm.

Please run this query to see if the Store Email is stored correctly in the database.
Code:
select FieldValue from ac_StoreSettings where FieldName = 'Email_DefaultAddress'


Are there any error log entries when a contact form is submitted? Please confirm by submitting a contact form if there is a new error entry on the Error Log page.


I'm sorry but I do not know how to run a query as you've instructed. I can provide an error log for the contact form again, though. Here is the latest one from about 30 minutes ago, and we have 7 error log entries for the New Contact Message today alone:

Error sending email with subject 'New Contact Message'. View less
Exception: Mailbox unavailable. The server response was: 5.1.0 Sender is not allowed to send from comcast.net (R2) Stack Trace: at System.Net.Mail.DataCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse) at System.Net.Mail.DataCommand.Send(SmtpConnection conn) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at CommerceBuilder.Messaging.EmailClient.Send(MailMessage mailMessage, SmtpSettings smtpSettings, Boolean throwOnError)
shaharyartiwana25816656  
#20 Posted : Tuesday, November 17, 2020 12:13:21 PM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Thanks for sharing the error details. Looking at error details I am certain that this is not an application-side issue.

Please try changing the store email to some other email address. It seems to be an email server issue.
Users browsing this topic
Guest
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.