Alerts no longer working from 1 source

Pushsafer make it easy and safe to get push-notifications in real time on your Android or Windows mobile device, iPhone, iPad and Desktop!

Mit Pushsafer kann man in Echtzeit, einfach und sicher, Push-Benachrichtigungen auf sein iPhone, iPad, Android oder Windows Gerät sowie auf den Desktop senden lassen!

======================
Google Play
App Store
Windows 10 Store
Homepage
User avatar
admin
Site Admin
Posts: 749
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Alerts no longer working from 1 source

Postby admin » 24. Sep 2021, 08:37

Hi,

the mail gateway works correctly, the issue is on your side. But you do not need to use the mail gateway.
Use a http request directly in python, its much faster.

Here an example code included image from local or remote (URL):

Code: Select all

from urllib.parse import urlencode
from urllib.request import Request, urlopen
import base64

# local image from drive
file = 'logo.jpg'
image = open(file, 'rb')
image_read = image.read()
image1 = base64.encodebytes(image_read)

# remote image from url
image2 = base64.b64encode(urlopen("https://www.pushsafer.com/de/assets/img/chrome_webpush.jpg").read())

url = 'https://www.pushsafer.com/api' # Set destination URL here
post_fields = {                       # Set POST fields here
	"t" : 'Test',
	"m" : 'Test Message',
	"s" : 11,
	"v" : 3,
	"i" : 33,
	"c" : '#FF0000',
	"d" : 'a',
	"u" : 'https://www.pushsafer.com',
	"ut" : 'Open Pushsafer',
	"k" : '[private_key]',
	"p" : 'data:image/jpeg;base64,'+str(image1.decode('ascii')),
	"p2" : 'data:image/jpeg;base64,'+str(image2.decode('ascii')),
	}

request = Request(url, urlencode(post_fields).encode())
json = urlopen(request).read().decode()
print(json)
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

alex@team-meek.com
Posts: 6
Joined: 20. Sep 2021, 08:09

Re: Alerts no longer working from 1 source

Postby alex@team-meek.com » 27. Sep 2021, 09:38

thanks - that code works just fine.

Bit of a mystery why the email stopped working but its working ok with the new code so happy days

thanks for your help

User avatar
admin
Site Admin
Posts: 749
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Alerts no longer working from 1 source

Postby admin » 28. Sep 2021, 10:23

alex@team-meek.com wrote:
27. Sep 2021, 09:38
thanks - that code works just fine.

Bit of a mystery why the email stopped working but its working ok with the new code so happy days

thanks for your help
:D great!!!

But the mail issue is on your side!

Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10


Who is online

Users browsing this forum: No registered users and 2 guests