Invalid SSL certificate
I can look into this. I see this can lead to problems for some use cases, where the raw text to be sent does not actually have the header lines that Blat is being told to not add. Might it be better if Blat tried to identify those header lines to be suppressed within the raw message body, and remove them if found, thus allowing Blat to build its header lines normally? Chip
With the above stunnel configuration, I would tell Blat to connect to 127.0.0.1:27, where the semicolon (:) separates the IP address from the port number. Stunnel is configured to listen to port 27, and when a connection request is received from Blat on that port, it will establish an encrypted session with Gmail, allowing Blat to be none-the-wiser while sending your emails.
The issue is that you are trying to connect to Google through an encrypted session port. How I have been able to get this done is to use stunnel to provide that encrypted session support. I was going to post a link to message threads that discuss this very topic, but I am not finding them just yet. Essentially, you would need to tell Gmail to allow less secure applications to access your account (there is a setting for this), and then install the free tool called stunnel. With this done, you point...
Hi there, any guidance greatly appreciated Regards Steve
Connection to server dropped
CMail has these features.
Hello Chip, Thanks for your response. I did extensive testing to isolate the reason. The summarize, I can send an e-mail in three ways: do not specify charset, e-mail contains only ASCII => Blat specifies ISO-8859-1 / 7BIT => DKIM=PASS do not specify charset, e-mail contains e.g. one umlaut => Blat specifies ISO-8859-1 / 8BIT => DKIM=FAIL specify charset=UTF-8 => Blat specifies UTF-8 / 8BIT => DKIM=PASS Option 2 fails because the "final" upstream server (Microsoft O365) does not like the ISO encoding...
When using -mime and using 8-bit encoding, your umlaut character can be send as-is. When using -mime, but using 7-bit encoding, your umlaut should be encoded. If your SMTP server allows 8-bit mime encoding, then Blat will use that. Changing the mime function to always encode values greater than 0x7F is easy, I just need to disable one line in an "if" condition. As a quick test, if you use -charset utf-7, this should give you want you want. Please give this a try. Chip
Doing some more testing, I tried to used -bodyF with a file saved with iso-8859-1 charset, same thing happened, the upstream server changes to utf-8 because of the "ö". Consequentially, if I specify the charset as -charset "UTF-8" on the command line, the DKIM result is PASS This is a fix at least for my test setup. Mails with umlauts are passing now. But there are two caveats with this fix, one, mail headers are reading Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" So...
quoted-printable not encoding umlaut / DKIM problems
The RCTP TO command does not appear in the e-mail at all, it's part of the SMTP session. The reply-to header is different and will be in the e-mail headers, but not in the format above. NOTIFY=SUCCESS relates to Delivery Status Notification, and is controlled using the -dsn option. If you're wanting a response from your (or an upstream) SMTP server to verify the e-mail was relayed or delivered, -dsn is what you're looking for.
The RCTP TO command does not appear in the e-mail at all, it's part of the SMTP session. The reply-to header is different and will be in the e-mail headers, but not in the format above. NOTIFY=SUCCESS related to Delivery Status Notification, and is controlled using the -dsn option. If you're wanting a response from your (or an upstream) SMTP server to verify the e-mail was relayed or delivered, -dsn is what you're looking for.
parameter reply-to needs NOTIFY=SUCCESS
E-mail can be written to file using the -file option and sent using -emailfile. https://www.inveigle.net/cmail/usage#_mandatory_options_mode_selection
Though "CMail is not intended to be a better Blat" it should be mentioned it's not open source (just freeware) and has no DLL (i.e. library for other programs) version. Also, its very partial support for OAuth makes them recommend to use Gmail without it, i.e. not that different from Blat. Also, its website mentions nothing about generating EML files, can you link to details how to do that?
Though "CMail is not intended to be a better Blat" it should be mentioned it's not open source (just freeware) and has no DLL (i.e. library for other programs) version. Also, its very partial support for OAuth makes them recommend to use Gmail without it, i.e. not that different from Blat.
Eventually I've added a simulator to the Blat frontend LWBlat. It's actually an embedded version of LWSMTP-Server.
I used CMail to generate .eml files. It can send them too.
I've been trying Papercut SMTP, which automatically saves every outgoing mail as an EML file and present those EML files inside a GUI, which has also has a raw message mode. Still it could be nice not to need an extra program.
I've been trying Papercut SMTP, which automatically saves every outgoing mail as an EML file and present those EML files inside a GUI, which has also has raw message mode. Still it could be nice not to need an extra program.
See related feature request about SSL.
I actually use smtp4dev for testing my output before going live. This creates both a .txt file for the session, and .eml file of what it receives. I have two versions of this program -- v2.1.1.0 and v3.1. The earlier version is simpler to use and locate the output. The newer version supports SMTPUTF8, but it does not support creating files the way the older version does. The newer version stores the received emails to a SQLite database. This makes it less useful for my purposes than the older ve...
When last I checked, OAuth requires HTTPS support, which brings in a whole other area of problems. Adding https support necessitates openssl for SSL/TLS support, security certificates, and more. Plus, this moves the needle away from providing SMTP services to only supporting HTML services where Google can more easily inject advertisements and tracking (etc.). HTML is not conducive for simple e-mail transport.
Many thanks Chip Funny because I went to create a "gmail account with an &" for testing and even gmail will not permit it. So I left them an email that the iso has & listed as "experimental" from 2014 and should consider refraining if possible but if they can provide me with a test email account ten I will try your flag noted below. Appreciate the quick response. Looks like we should probably upgrade as well! Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19) On Windows. I will dig out the...
Simulator mode (generate EML file instead of actually sending anything)
I think it's for all apps. There's still an alternative of App Passwords but it's more cumbersome. Anyway, I've created a feature request just in case.
Support OAuth
I think it's for all apps. There's still an alternative of App Passwords but it's more cumbersome. Anyway, I've created a feature request just in case.
Thanks, but I've never claimed -log and -log "" are different. What you should compare to is running -log filename which prints to the screen even less than not using -log at all. I claim -log (or -log "") should at the very least print to the screen just as little as -log filename, and certainly not more.
I just ran Blat v3.2.24 three times. The first time was without the -log option. The second time was with -log, but no filename. The third time was -log "" (empty string). Here are my results: F:\BLAT\BLAT3224>x64\Release\blat.exe - -body "1" -base64 -u me -pw me -to myself -s "testing base64 on message body" -p smtp4dev Blat v3.2.24 (build : Feb 9 2022 21:19:39) 64-bit Windows, Full, Unicode Sending stdin.txt to me@localhost Subject: testing base64 on message body Login name is me@localhost F:\BLAT\BLAT3224>x64\Release\blat.exe...
None that I am aware of. Blat.dll should be self contained. Are you having troubles getting it to run?
What is the character set that is being requested? In my collection of tests, I have one that sends to many email addresses from a text file, and uses -maxnames option. In this test, I added another email address that has the ampersand. Blat sent the message just fine without any other character set definitions. I tested this with version 3.2.24.
Do you need to use the -u and -pw options, to log into the SMTP server?
hello someone with with an existing Blat implementation now has issues with a new email address. The email address has character set different vs initial launch of Blat. the recipient's email (ie "to" ) has an Ampersand "&" in the email address ie email address below for demo purposes only - not real but notice "&" in the email address for example Chris&Weadick@gmail.com the email address is failing. I let them know that the & is listed as "experimental" in the iso standards. but because "google"...
I was somewhat underestimating my C++ skills. I stiil remember something.. :) So i was somewhat wrong assuming that decoding console input is required only when it'scodepage is not equal to system one. No, it should be decoded to Unicode ALWAYS. And I haven't managed to test it when console is Unicode (UTF-7 or 8). Seems that Windows has still broken Unicode console input. In this case, I think, the code needs further improvement. I don't know, how to post code changes to Blat code, so I'm posting...
And yes, that is the case for NT systems (GetConsoleCP available starting from Windows 2000) and such setups are beginning from that era.
Detect console codepage when getting text from it
Error 550 using Blat
Please add SSL/TLS support. I have to use Swithmail now. I don't want to have to install stunnel on 100+ machines to email reports. Thank you for considering this. - Lazy Admin since 1992
Clever suggestion, and you're right about the port number. However, I would like a method that seems as easy as what is available when one sends a page from a browser. I don't do this all that often.
If your server requires STARTTLS, then it should also require port 465 or 587. I use stunnel to provide the SSL / TLS service, and have Blat configured to use IP 127.0.0.1 to send messages through stunnel. Stunnel can be downloaded from https://www.stunnel.org/, it is free to use, and they maintain it as SSL and TLS protocols are updated. If you want help getting this configured, I can provide a copy of stunnel.conf that works for me.
I have been able to use Wireshark to capture a Blat and a PowerShell Script. First the PowerShell- shown below is the PS script. It runs fine with no errors. The capture is only about 4 seconds but it seems like the capture is showing all the proper communications. Both computers say hello and the server says it is ready. It is using port 587 and it seems to be sending data. However I still don't receive an email. $EmailTo = "phillipiparker@hotmail.com" $EmailFrom = "phillipiparker@hotmail.com" $Subject...
I have included my login password but blat message says, Warning The SMTP server does not require AUTH LOGIN. Is this because server requires STARTTLS?
I asked the support. Answer below; Hello, Only the administrative users of the project can close the ticket. Sincerely, SourceForge Support! Anyway Thank you for the binaries 3.2.24
I cannot close the ticket, either.
Using the Version 3.2.24 the fix incorporated in 3.2.23 works. Please close this ticket (I cannot do that ?)
I talked to my ISP "Cox Communications" and they assure me that they play no part in this type of transaction. All they are doing is connecting me to the WWW. They don't manipulate or block anything that does not involve Cox directly. That being the case, I believe Microsoft would be the only player since it is a hotmail account and the SMTP server must be a Microsoft server. I know that Outlook has a help line so that might be a place to start. I had not considered a windows update could be involved...
Hi Chip, I have installed the latest version and all work fine. Thank You
Hello Chip, The version is 1.9.4
The fix you proposed for version 3.2.22 has already been incorporated into version 3.2.23 and beyond. The 32-bit full version 3.2.24 is here: https://app.box.com/s/sbqywrd5phmhxxtbi9u2csvcz18hywrt The 64-bit full version 3.2.24 is here: https://app.box.com/s/zh28oqn03dlnqcez54m92al9om9seual I will upload the files to SourceForge this weekend.
Since powershell has stopped sending, then my guess is either a setting in your Windows system changed with a recent Windows update, or your ISP made a change. If it were me, I would call my ISP support desk to inquire about outgoing messages on port 587. Alternatively, you can install wireshark and trace your internet traffic. This will not show the encrypted messages, but it would show the DNS lookups and if you are actually communicating with the SMTP server(s).
Which version of Blat are you using?
I guess the thing that bothers me is that I have been using the above configurations for at least 2 years with no problems. Also I run 6 powershell scripts which don't use blat or stunnel and they all stopped sending emails at the same time as the Blat scripts. There has to be something external going on but I have no clue where to start looking.
Attached a short description how I fixed the error for me. Would be nice, if this correction could be integrated into the repository.
Another option might be -attach "ing.tx*" with your example directory list. Not adressing the actual problem but yes it runs (even quoted!). It seems, that blat has its own routine to collect files from using filenamepatterns (cmp. attach.cpp -> collectAttachmentInfo using Win-API -> FindFirst/FindNext) Commas and spaces in filenames present problems with parsing, because the C programming language uses these two for its own internal command line parsing. Not C, but the startupcode of the used C-runtimelibrary....
Error sending email to gmail addresses
Another option might be -attach "ing.tx*" with your example directory list. Commas and spaces in filenames present problems with parsing, because the C programming language uses these two for its own internal command line parsing. The asterisks that I used should give you all three of your special case files.
127.0.0.1:25 would be correct, as that is where your stunnel is listening. See the statement 'accept = 127.0.0.1:25'. You have 'sslversion = all' in your configuration, I might try changing this to 'sslversion = TLSv1' My stunnel.conf file also has 'fips = no' I have not used it to connect with live.com for a long time, so I do not know if my settings work any better.
Sorry for the delay, I have been away from my computer since end of May. Near term, I would say that you do need to be whitelisted. I need to look for definitions of SPF and DKIM to learn if there is anything I can do to help.
Sorry for the delay, I have been away from my computer since end of May. Near term, I would say that you do need to be whitelisted. I need to look for definitions of SPF and DKIM to learn if there is anything I can do to help.
Using a quoted attachmentfilename -> further files in list not attached
I will start out by saying I am too embarrassed so say how long I have been working on this issue with zero results. In any given month Blat executes 6-8 times telling me if various backups or sync operations were successful. Everything worked fine until a few months ago when all the outgoing emails stopped. Interestingly I also run powershell scripts as a backup and they stopped outgoing mail a the same time. Shown below is a typical configuration I have successfully used for years. Blat has been...
All of my blat messages are being blocked by hotmail and gmail (probably any other webmail as well) because they don't have SPF or DKIM entries. They don't even end up in spam folders. Is there any way to get this to work? Do I need to be whitelisted?
I sent a message to my gmail account and noticed that there are no SPF or DKIM entries, which cause it to be marked as spam and entirely blocked (doesn't even end up in the spam folder!). Is there anything we can do to get around this?
never mind, I found the -sf subjfile.sf command line option and that works great now!
Aha! I don't need -penguin anymore after all. thanks for this! Yeah, I had to specify the full path after -sf.
What is the last version that supports -penguin for subject passing via the first line of the input file? The latest full version doesn't seem to, or if it does does it differently. Is there any documentation on this undocumented command-line option?
Content-Transfer-Encoding and Content-Transfer-Encryption case-sensitive
Hi Chip, please ignore the last message. I started the wrong blat. Everything works perfect. Thanks for your support. Heiko
Hi Chip, it doesn't work as supposed. This is the command file: "C:\QmedLokal_temp\Programme\blat\blat.exe" -q -to "info@kkh.kim.telematik" -server 192.168.1.4 -port 25 -u "xxx" -pw xxx -f "xxx" -log D:\QMED\DATEN\KIM\blat\KIM_15022022_112202.log -s "EEAU0_42787658-30ac-a242-bec5-3767566a30b0" -attach "D:\QMED\DATEN\Dokumente\1\eAu\2022\02\EEAU0_42787658-30ac-a242-bec5-3767566a30b0.p7s<eau;application octet-stream="">" -x "X-KIM-Dienstkennung: eAU;Lieferung;V1.0" -x "X-KIM-Sendersystem: Q-MED;305.244"...
Hi Chip, we use both versions (32 and 64 bit). Where can I download the finished version? At Sourceforge. Instead you can also mail it to h.mueck@qmed.de Greetings Heiko
It looks like I have to choose a different character instead of the percent symbol. Please send me an email to say if you want the 32-bit version or 64-bit version, as I do not remember which you use. Thanks, Chip
This is what you are asking for? To do this is a simple edit from what I had coded the other night. Example with description only: -attach file.p7s<eau> Example with description and content type: -attach file.p7s<eau%application/octet-stream> Example with content type only: -attach file.p7s<%application/octet-stream>
Hi Chip, that would be perfect. But one question, can you change the order of the parameters, at first eAU and after that octet-stream. We are using the old parameter in a few situations and by changing the order we don't have do change the old code. Example -attach file.p7s<eau%application octet-stream=""> That would be perfect. Greetings Heiko</eau%application>
It looks like the -contentType option works only if I cannot find the file extension in Windows registry. If I read your note correctly, you need something to change the Content-Type on a per file basis. If I make it so you can set the content type by using %, would that work for you? Example with content type and description: -attach file.p7s<application/octet-stream%eau> In the example, application/octet-stream would be the content type, and eau would be the description. If the % character is missing...
I am sorry for the long delay giving a response. I need to check the sources, then I will be back to give an update.
Different content-type for attachment
Hi does Blat support SSL/TLS? If not - will it be added? Thanks
Hi, When distributing to user, is it sufficient to just give blat.dll? Do I need to include anything else? My program runs fine on my PC but not when installed on user's pc. Keep failing to load blat.dll TIA.
Hi, When distributing to user, is it sufficient to just give blat.dll? Do I need to include anything else? My program runs fine on my PC but not when installed on user's pc. Keep failing to load blat.dll TIA.
I'm using blat.dll. Parameters are passed using -of
Thanks for your time and answer Chip! How about the '\'? Does Blat still requires escaping it? TIA
Any parameter that has spaces must have quotes around it. Example #1: -bodyf "C:\Users\Default User\Documents\Invoice for March.txt" Example #2: -body "Here is the invoice attachment you requested last Friday.||Regards,|Chip"
Hi, Can I check what is the latest treatment on how to write path especially when supplying parameter to -bodyf, -log and -attach? i. Does the path need to be enclosed in quotes? ii. Does it need to use \? TIA
Hi Chip, thanks for your support and sorry, that my answer comes so late because I am working on the problem with a colleague, that was on vacation. I think me must talk again with the institution, why they don't get the attachments. They said, it would be missing because of the problem withe the missing empty lines, but you showed us, that they are not right. We have to find out, what the real problem is. We will report later. Greetings Heiko
For testing, I changed -superdebugT to -superdebug, to see the hex values for each byte being transmitted. In the output, I see a blank line between headers and message body, per RFC requirements. I attached an image of the "received" email opened with Notepad. Maybe your new client can be more descriptive about what they received and how they expect it to be exactly formatted. According to my email programs and web browsers, the sent email is RFC compliant when each program opened the message. ...
I will check the sources, but I thought I still added a blank line per the RFC even when you use the -x option.
empty line between header and body
HI Chip, I removed the -html and changed the file ext from .txt to .html. It sends fine but still goes into SPAM. I would assume now that its the format of the body that is not correct. I am not good with this kind of stuff so if you can give me pointers as to how best to format the body in html, it would be a big help. Thanks, Rick
I can think of three possible issues. First, the user may have marked your messages as spam at some point in the past. Second, the user may need to indicate your email address is from a safe sender. And last, the spam filter might be triggering on how your messages are formatted or the text of your messages. The first two items are up to the recipient. If the spam filter is triggering on your message format, or text content, this you may need to make some adjustments and experiment with to gauge...
Hi All, The issue I am having is that ALL emails go into the SPAM folder of the recipient. Is there something I need to do to stop this from happening? Here is the blat command: d:\blat\blat d:\blat\items\chbs\168.TXT -t "rick@xxx.com" -BCC "rick@xxx.com" -s "test email" -i "rick@xxx.com" -server "localhost" -ti 60 -f "rick@xxx.com" -html -nomps Here is the contents of 168.txt: This is a test email. To show issues with SPAM What am I doing wrong? Thanks for your help, Rick
Ok. Some information about ports 465 and 587, these use encrypted connections. Port 465 uses SSL protocol, while port 587 uses TLS protocol. Since Blat does not directly support either SSL or TLS, it is expected that connections to either port will fail. However, the solution I have been using for many years is stunnel from stunnel.org. This nifty tool establishes the SSL / TLS connections, and Blat then connects to a user specified port on IP 127.0.0.1, which stunnel listens for connections. To...
Problem solved. Close ticket.