elasticemail / elasticemail.webapiclient-js Goto Github PK
View Code? Open in Web Editor NEWDeprecated library. Easily send emails with Elastic Email using Web API JS Client https://elasticemail.com/
License: MIT License
Deprecated library. Easily send emails with Elastic Email using Web API JS Client https://elasticemail.com/
License: MIT License
i did same configurations as mentioned here but it is giving error as undefined whenever we send emails. but whenever I use same code in .js code is working fine.
how we can run this code in typescript?
Hello! I'm trying to use the File.Upload API, but it is not well documented. For example, the "file" argument says in the JSDoc that is an Object, but not specifies what type of object.
Can you put an example on how to attach files or add the correct documentation to the JSDoc?
Thanks!
Hello,
First, thank you for your service that I use to send a newsletter about JavaScript trends: https://weekly.bestofjs.org/.
I try to create a campaign using the campaign/add
end point from the API.
A parameter named campaign
is expected. When I use the following value:
{
name: 'My campaign',
targets: [l123],
CampaignTemplates: [
{
TemplateID: '5213',
TemplateSubject: 'My subject',
TemplateFromEmail: '[email protected]',
TemplateReplyEmail: '[email protected]',
TemplateReplyName: 'Best of JavaScript'
}
],
TriggerType: 1 // 1 means "SendNow"
}
...I get the following error:
Trigger count and trigger frequency can only be set for scheduled campaigns
But I don't pass any "trigger" parameter and I don't want a scheduled newsletter, I want to send it manually later.
Am I missing something? How can I unset the "trigger" parameters?
Thank you very much for your help!
hey I did the same configuration as mentioned here to send emails. but I am getting below error while sending emails
email sendig error : TypeError: source.on is not a function
at Function.DelayedStream.create (/home/sahil/Documents/node_modules/delayed-stream/lib/delayed_stream.js:33:10)
at FormData.CombinedStream.append (/home/sahil/Documents/node_modules/combined-stream/lib/combined_stream.js:45:37)
I am not able to understand this error.
Hi,
My startup is considering to use your service.
We are using typescript and it would be amazing if you had types.
You do have a lot of comment docs, but its still confusing.
For example:
On Logs.Load(), the status param doc is:
So what is it? It says its an {Object}, and a list, and what does a list mean? A javascript array or a string of comma seperated numbers?
Thanks,
Itay
by using above library i am only able to use send email functions remaining functions are not able to access. kindly provide any way so i can integrate account apis as well. index.ts file only having Email class.
I'm using this library, getting success messages from the server, but alas, no emails seem to be getting thru.
--I'm using https://www.npmjs.com/package/elasticemail-webapiclient
const eeClient = require('elasticemail-webapiclient').client;
const { ELASTICEMAIL_API_KEY } = require("../../config");
const options = {
apiKey: ELASTICEMAIL_API_KEY,
apiUri: 'https://api.elasticemail.com/',
apiVersion: 'v2'
}
const SendAnEmail = (msgContent) => {
const EE = new eeClient(options);
// Load account data
EE.Account.Load().then(function (resp) {
console.log(resp);
});
// Send email
EE.Email.Send(msgContent)
.catch((err) => {
console.log("Oops, Error from ElasticEmail Server while sending email: ", err)
throw new Error(err);
});
}
module.exports = SendAnEmail;
function called with message, directly copied from the readme file on this repo. Only thing I changed was I added my own email in the to:
block.
Function called, I see a message in the console log on the server (running on localhost):
{success: true, data: {…}}
src/helpers/sendAnEmail.js:40
data:{taxcode: '', publicaccountid: 'baxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', apikey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx', issub: false, isuser: false}
success:true
__proto__:Object
Yet, I see no email in my inbox, no email in my spam folder. Console at ElasticEmail shows absolute no account activity at all. Am I doing this correctly?
initialized the client with the newly issued hot Apikey.
import ee from 'elasticemail-webapiclient'
const onlyViewApikey =
'B0A437740E95AE435073F101F72D63CC240803CA4C3DA91B8A5B5396236FEB2D4A30EB05543BF8018CD5CBDD52391FEA'
const options = {
apiKey: onlyViewApikey,
apiUri: 'https://api.elasticemail.com/',
apiVersion: 'v2'
}
const EE = new ee(options)
// Load account data
EE.Account.Load()
.then(function(resp) {
console.log(resp.data)
})
.catch(error => {
console.log(error)
})
The response result I received is "access Denied".
why.. help me thank you
below is the response I received.
...
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'user-agent': [Array],
host: [Array]
}
},
data: { success: false, error: 'Access Denied.' }
}
Access Denied.
Hi
the version that is published in npm seems to not have been pushed to this repo ...
also the line "var export = {}" creates an incompatibility with ES6 since export is a reserved word, so this library doesn't work with node 8.x for example
Hi there,
I got this error
"self._form.on is not a function"
when I tested it on my project.
please give me help.
Thank you.
Hello,
I noticed that the email/verifydmarc endpoint is missing from the api client.
Can you please add this?
Thank you
This call that was working perfectly fine, now fails.
const EEOptions = {
apiKey: 'BA05CB368C38B35F6F92D6573EA12D5343F465D18656DD7C80C4F27A708D1DF4BDAF7974F20DCDA80F830C3D8BE86CEA',
apiUri: 'https://api.elasticemail.com/',
apiVersion: 'v2'
};
//************** */
// ElasticEmail Account APIs
//************** */
export async function eeAccountAddSubaccount(email: string) {
const data = {
email: email,
password: 'placeHolderPassw0rd',
confirmPassword: 'placeHolderPassw0rd'
};
const eeClient = require('elasticemail-webapiclient').client;
const EE = new eeClient(EEOptions);
// ***** -> the following fails with 'undefined'
return await EE.Account.AddSubAccount(data).catch((err: any) => console.error('error from elasticEmail: ', err));
}
The call fails with an undefined error. For the same reason, EE.Account.GetSubAccountApiKey
fails as well, which pretty much prevents me from doing any operation.
This is a blocking isue.
Library is not returning API errors, quick fix hack: master...rhaenni:master
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.