New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SendEmail
error: HTTP/1.1 505 HTTP Version not supported
error
#2
Comments
It's strange, I'm using the same IAM user, it was ok when I tried several days ago with the 'VerifiedSenders' sample project. But now I tried again with the same set of access key and secret, I'm getting the In this thread it seems that AWS returns details about the error. With ksAws is there a way to check detailed error like that? Thanks! |
Update 1: I confirm with the AWS CLI, the |
Just pushed an update, it looks like it may have been to do with query/header encoding. Let me know if it's fixed, appears to be working for me now. |
Thanks @gmurt To get the latest commit compiled, I had to change in ksAwsHash.pas the following line And unfortunately, I'm still getting the I attached the testing code below: |
Thanks @gmurt ! Good to know it works, I'll try again. |
Hey Graham, With the same testing project I attached without further changes, after restarted my computer, now both the btnGeVerifiedSenders and btnSend are working!!! Not sure why, maybe the constant switching of "direct connection vs shadowsocks (proxy) connection" on the computer caused the issue... |
Good to hear. Any further problems let me know. |
I'm getting the I think this kind of email body length is very normal. |
Hi Graham, For example, the following code will work:
The following code does NOT work (notice the double quotes in the subject), it will produce the
|
Ok, I'll take a look. Can you also provide me a simple example which produces the 505 error on your machine? This will help me identify the issue. |
I believe the latest update will fix the 403 error when using Indy. If you can provide an example which produces the 505 that would help me fix that one. |
I confirm with the latest update I'm no longer getting the 403 error, but only the |
@gmurt , the following code will produce the 505 error. The code example was extracted from the sample I attached earlier - I just added double quotes to the email subject. BTW, WWIW, I'm using a latest revision of Indy from the official repository: https://github.com/IndySockets/Indy
|
Think it was the encoding of the space " " character. Please pull latest changes and retry. |
Thanks Graham! I'll check it now. BTW, does |
Not sure, I've only tested with plain text messages. I'll close this issue, if there's a problem with html please open a new ticket and I'll take a look. |
Sorry I mis-read your last message. Thought you confirmed it was fixed. Please test and if the 505 is fixed I'll close this issue. |
The issue with double quotes in the subject has been fixed, but with body text like the following still emit the
|
Please can you supply me the full source for the unit so I can see how the constants are declared. |
Attached. |
Ok, hopefully now sorted! Let me know if it's fixed with the latest change. |
Thanks again for the help @gmurt. |
Working fine here. Forbidden suggests it may be an issue with your credentials. Ensure that you are entering them without spaces etc. Just tested again with XE4/Indy. I'll try and make some improvements so more detailed error messages are displayed. |
Just googled, a 403 suggests that there may be a leading/trailing space added by mistake to your secret key. I tested and if I add a space to the Secret key I do get the 403 error. I'll make sure the keys are "trimmed" with the next update but please check this. |
Hello Graham, I confirm there are no leading/trailing spaces added to the keys. It's the same test program we've been using in the past days. the 'subject' and 'body' were the only things that were changed during the test. |
I've just resynced the repo to my machine and run your example in XE4 with the standard Indy which ships with that version. The only change I've made is to hard code the credentials and changed the email addresses. It works fine, it "has" to be a credential issue at your end, there's nothing else it can be. Maybe create some new credentials in IAM and test in case your existing credentials have been invalidated. |
@gmurt , Thanks for your help and sorry for all the troubles - not sure why, but today I re-run the programs (both, one real project, another is the test program I sent to you), without any changes, I tried several times, and the email sending worked! I'm also puzzled. The only thing that's changed is the computer has been rebooted. But last night (my time) I did try to reboot the PC and try again, but the problem existed. |
Very strange but glad it's working now. I'll close this issue. |
When calling the Indy-powered
SendEmail
I'm getting theHTTP/1.1 505 HTTP Version not supported
error.then I added the following line to
TksAwsBaseService.GetUrl
:Result := UrlEncode(Result);
And now I'm getting the following new error:
HTTP/1.1 403 Forbidden.
Any idea? Thanks!
The text was updated successfully, but these errors were encountered: