Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
SmtpcomApi is a ruby wrapper for the http://smtp.com API (http://api.smtp.com)
[sudo] gem install smtpcom_api
You need api key and api url for authentication in SmtpcomApi
client = SmtpcomApi::Client.new('your_api_key', 'api_url')
Getting account
account = client.account
Getting account attributes as hash
account.attributes
# or
account.to_hash
Updating account attributes:
account.company_name = 'My Company'
account.save
Getting senders list
senders = client.senders
# or
senders = account.senders
Finding one sender by his label or id
sender = client.sender('sender_label_or_id')
# or
sender = account.sender('sender_label_or_id')
Getting sender attributes as hash
sener.attributes
# or
sender.to_hash
Updating sender attributes
sender.login = 'new_login'
sender.password = 'new_password1'
sender.save
Adding new sender
attributes = {
:label => 'my_label',
:login => 'my_login',
:password => 'my_password1',
:max_quota => 10000
}
new_sender = client.add_sender attributes
Some senders could be authenticated by IP address instead of login/pass To allow sender login that way you should set :is_ip_based attribute to true and add allowed IPs
# setting is_ip_based = true
new_sender.is_ip_based = true
new_sender.save
# adding allowed IPs
new_sender.add_allowed_ip('222.178.23.97')
# or removing some
new_sender.remove_allowed_ip('222.178.23.97')
Examples how to get sender statistics data (summary/detailed delivery/campaigns/complaints/queue):
now = Time.now.to_i
month_ago = now - 30*24*60*60
sender.summary :time_start => month_ago, :time_end => now
sender.delivery :time_start => month_ago, :time_end => now, :limit => 10, :offset => 0
sender.campaigns :time_start => month_ago, :time_end => now
sender.complaints :time_start => month_ago, :time_end => now, :limit => 10, :offset => 0
sender.queue :time_start => month_ago, :time_end => now, :limit => 10, :offset => 0
Copyright (c) 2012 Vasiliy Sablin. See LICENSE.txt for further details.
FAQs
Unknown package
We found that smtpcom_api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.