jeffreykemp / mailgun-plsql-api Goto Github PK
View Code? Open in Web Editor NEWOracle PL/SQL API for Mailgun
Home Page: https://jeffreykemp.github.io/mailgun-plsql-api/
License: MIT License
Oracle PL/SQL API for Mailgun
Home Page: https://jeffreykemp.github.io/mailgun-plsql-api/
License: MIT License
get_complaints
Get a list of complaints - recipients who marked your messages as spam.
Returns an array of records:
https://documentation.mailgun.com/api-suppressions.html#view-all-complaints
update_tag
Update the description for a tag.
Parameters:
enc_chars fails with ORA-06502: PL/SQL: numeric or value error: character string buffer too small if the any 8000-character chunk of the message body, when encoded, happens to require more than 8000 characters to be stored.
add_unsubscribe
Add an address to the unsubscribe list.
https://documentation.mailgun.com/api-suppressions.html#unsubscribes
Method to add many recipients. Each recipient has an email address, name, to/cc/bcc, and ID. Subject and message can have substitution strings.
e.g. for inline CSS file
Hi Jeffrey Kemp, This is great work without no doubt.
I have an issue, After sending an email to the client, then client reply to sender then how can I get this email or where I can check?
If there are no email receive option. plz add this feature for next release.
The package logs all data sent to and received from the mailgun server; add a "verbose" option and only log this data if verbose is on. Default to off.
Calls to send_email
should put the email into a queue.
Create a separate optional package mailgun_aq_pkg
which adds an AQ layer over the top of mailgun_pkg.send_email
.
Add p_priority
which allows emails to get bumped to the head of the queue (or pushed to the back of the queue).
Add push_queue
procedure which can be called periodically and/or immediately after requesting an email.
Add a log table to log emails and their results.
Add schema-level types for emails and related data.
Include procedures to manage the queue and the scheduler job.
Currently, special characters such as MS Word "smart quotes" are shown as ? in the email. Encode these so they can be sent.
get_events
Use the Mailgun Events API to retrieve a log of email events.
Filter Expressions: refer to mailgun documentation for examples
Returns an array of records:
Configurable setting to restrict maximum size (including attachments) to 25MB.
delete_unsubscribe
Removes an address from the unsubscribed list.
https://documentation.mailgun.com/api-suppressions.html#unsubscribes
get_tags
Get a list of tags.
Parameters:
Returns an array of records with:
Implement a whitelist mechanism - e.g. validate email recipient domain against a whitelist of domains.
When a recipient fails the whitelist, allow one of the following to happen:
Also, allow a separate whitelist for the sending email domain. e.g. "if sender is not [email protected], change the sender email address to [email protected]".
Only applies to Logger version
If a recipient name or other attribute includes an ampersand (&) it gets encoded as \u0026 before sending as JSON to mailgun. Mailgun does not decode this when performing the substitution in the email body text for bulk mailing.
Store in the settings table
Hi Jeff,
We are facing issues in sending mail through API. I think this issue is related to either ACL or the certificate as all the other values are provided by Mailgun.
Can you please guide me in resolving the issue?
When pushing the queue we are encountering the following issue:
ORA-20000: post failed 301 Moved Permanently [app.optimium.in/messages]
Whle using mailgun_pkg.email_is_valid we are encountering the following error:
ORA-29273: HTTP request failed
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at "SYS.UTL_HTTP", line 380
Thanks and regards
Sammeer
get_tag_stats
Get statistics for a given tag.
Parameters:
Returns a table of records with structure:
It should be noted that some stats will overlap (e.g. "accepted total" = "accepted outgoing" + "accepted incoming").
https://documentation.mailgun.com/api-stats.html#stats
Note that stats have different retention policies depending on resolution (hourly/daily/monthly).
Allow sending a test email, optionally using a given set of mailgun parameters (i.e. doesn't change the mailgun settings).
Bypass AQ - make the connection in the current session.
If the push_queue process gets an error from the mailgun server, it just logs the failure using the default logging procedures.
Instead, it should log the failure in the mailgun_email_log table.
On running mailgun_pkg.email_is_valid I am encountering the following error:
Error report -
ORA-20000: mailgun setting not set "pubkey-xxxxxxxxxxxxxxxxxxxxxxx" - please setup using MAILGUN_PKG.init()
Additionally,
on executing mailgun_pkg.push_queue I encountered the following error:
ORA-20000: mailgun setting not set "app.optimium.in" - please setup using MAILGUN_PKG.init()
I have noted down the API keys from mailgun.
get_bounces
Get a list of recipient mailbox suppressions due to Bounces.
Returns array of records:
https://documentation.mailgun.com/api-suppressions.html#bounces
regression from v0.2
get_unsubscribes
Get a list of unsubscribed email addresses.
Returns an array of records:
https://documentation.mailgun.com/api-suppressions.html#unsubscribes
Allow adding arbitrary mail headers, such as:
Importance (high, normal, low)
Priority (normal, urgent, non-urgent)
Sensitivity (personal, private, confidential)
Expires (date/time, e.g. Thu, 28 Apr 2016 22:38:47 +08:00)
e.g.
{
"Importance" : "high",
"Priority" : "urgent",
"Sensitivity" : "confidential",
"Expires" : "Thu, 28 Apr 2016 22:38:47 +08:00"
}
Note: not to be confused with the priority parameter in the AQ version.
dbms_lob.getlength returns size in characters, not bytes.
delete_complaint
Remove an email address from the Complaints list.
https://documentation.mailgun.com/api-suppressions.html#view-all-complaints
delete_bounce
Clear a given bounce event (allow delivery to the email address until it bounces again).
delete_bounces_all
Clear all bounced email addresses (no parameters).
https://documentation.mailgun.com/api-suppressions.html#bounces
Allow client programs to initiate a push_queue asynchronously (so that the push won't happen unless they commit, and the push won't occur in their session).
delete_tag
Delete a tag.
Parameters:
Implement an email template system.
send_email
accepts template name as parameter, plus substitution variablesAll templates (including sub-templates) support these substitution variables:
#GLOBAL_NAME#
= database global name#DT:format#
= date/time (specify Oracle format)#SENDER:NAME#
#SENDER:EMAIL#
#variable#
= any arbitrary template variableThe main template supports these substitution variables:
#HEADER#
#BODY#
#REGION1#
.. #REGION9#
#SIDEBAR1#
.. #SIDEBAR9#
#FOOTER#
Each Region and Sidebar sub-template supports these substitution variables:
#TITLE#
#CONTENT#
#IMAGE#
Note: Mailgun substitution variables also allowed, e.g. %recipient.email%
, %recipient.name%
, %tag_unsubscribe_url%
Allow quarantining emails from a non-prod (dev or test) database instance. e.g. suppress entirely, or send them to a designated recipient list.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.