Problem configuring mail for local Blynk server

I’m setting up a local Blynk Server on my Macbook Pro running Catalina 10.15.7. I’m able to successfully install with -serverProperties specified. When I try to add -mailProperties, however, I get an error message.

Here’s the command line to start the server (after a “cd” to the directory containing all files):

java -jar server-0.41.14-java8.jar -dataFolder server_data -serverConfig -mailConfig

Here’s the file


and here’s the output:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.length()" because "s" is null
	at javax.mail.internet.InternetAddress.parse(
	at javax.mail.internet.InternetAddress.parse(
	at javax.mail.internet.InternetAddress.<init>(
	at cc.blynk.server.notifications.mail.GMailClient.<init>(
	at cc.blynk.server.notifications.mail.MailWrapper.<init>(
	at cc.blynk.server.Holder.<init>(
	at cc.blynk.server.launcher.ServerLauncher.start(
	at cc.blynk.server.launcher.ServerLauncher.main(

Can someone help me with this? Thanks!

The Blynk server GitHub page doesn’t mention specifying the path to the file in the startup command. It says…

Create file within same folder where server.jar is.


Right. And that’s exactly what I did Pete. Here’s the “ls -p” for that directory.

logs/				server-0.41.14-java8.jar	server_data/		static/

So what happens if you start your server with just…

java -jar server-0.41.14-java8.jar -dataFolder server_data -serverConfig


Works just fine; able to add a new user from the app (although I’ve had problems accessing the admin console, as I described in a separate post). No problems until I add the -mailConfig flag. Then, blooooeee!

The point I’m making is that flag isn’t in the documentation, and isn’t required to be able to send emails from the app.


Hi Pete, The flag IS in the documentation. Looking here: I see:

Advanced local server setup

For more flexibility you can extend server with more options by creating file in same folder as server.jar . Example could be found here. You could also specify any path to file via command line argument -serverConfig . You can do the same with via -mailConfig and via -smsConfig .

I’m trying to set this up, because I want the server to send me email with the auth token when a new project is created (rather than trying to transcribe it off my iPhone screen into my sketch). If there’s a better way (or any other way!!) to do this, please let me know! Thanks.

I’m seeing now that I didn’t read this carefully enough. Going to do some more testing, and will get back with results

But this is t what you’re doing is it? You aren’t specifying a path to these files in your startup command.

If the files in question are in the same location as the .jar file then you don’t need to mention them in the startup command, they will be found automatically. If you want to put them somewhere else then you need to include this in the startup command and specify the path to these files

My server startup command looks like this:

java -jar /home/pi/server-0.41.13.jar -dataFolder /home/pi/Blynk &

and my /home/pi folder looks like this:


Thanks, Pete. I figured out what you were trying to tell me just before you sent that informative note; thank you. The server is starting up just fine without the extra flags. And the app tells me that an email is sent when I create a new project. However, in the server log I’m seeing:

3:03:43.113 ERROR- Error sending email auth token to user : Error: 530-5.7.0 Authentication Required. Learn more at
530 5.7.0 z14sm80344oot.5 - gsmtp

I tried following that link, but it seems to be dead. I did a bit of Googling, and found this can be due to 2-part authentication in Gmail, but I checked, and I don’t have 2-part authentication turned on. I did activate “Allow less secure apps”. Also double-checked the password that I entered in, and it looks fine.
Any thoughts on what this problem might be?

Not sure to be honest.

My mail properties file has these additional lines:


not sure if that would help?
I think you may have to restart the server for any changes to take effect - this is certainly the case with

I’m not really a Gmail user myself, although I do have an account that I set up to be able to access some Google functionality and that I use occasionally for a few odd things. Like everything, I have two-factor authorisation configured for this account.
However, I created a new Gmail account and configured the “Allow less secure apps” option and no two-factor authorisation and this is used solely for Blynk emails.

Oh, and don’t try editing these files through the Blynk admin console - changes aren’t saved!


And this might be worth trying too,


SOLVED. After a lot of poking around, I found someone with a similar problem describe dealing with markup in their file. I had the same problem! The TextEditor program I was using on the Mac was hiding a bunch of markup. When I did a “cat” in the terminal, I could see it. The fix was to delete the file, then re-create it by typing “cat >” in the terminal, type in all the correct lines, then to complete the file. I did the same for, and everything is working great now :slight_smile: Thanks very much for your help with this, Pete.

1 Like