• Neuralab.Net – digitalna dizajn agencija za Web, Mobilne aplikacije, Socijalne mreže i Cloud hosting
  • Kontaktirajte nas
  • Check out our portfolio in English here
  • Kontaktirajte nas
  • Zapratite nas na Twitteru
  • Lajkamo FB Timeline
  • Pretplatite se na Tumblr blog
  • Search Site

  • O Neuralabu
    • Junaci Neuralab straniceUpoznajte tim i što sve volimo raditi :)
    • Nagrade & FestivaliSim pak tam
    • Mediji o nama (Press kutak)Što je Neuralab / Što je Transmeet.Tv … Najbolje da čujete od drugih :)
    • Partneri i suradniciPartneri i suradnici pri realizaciji IT / Web / Mobile projekata
  • Što radimo
    • Dizajn i korisnička sučeljaKoncepti, Wireframing, Web dizajn, Grafički dizajn, UX / UI, Interaktivni razvoj
    • Web razvoj i programiranjeWeb stranice, Mobilne aplikacije, CMS-ovi, Flash igre, B2B Web sučelja, SEO / SEM, Baze podataka
    • Multimedia, Video & Live streamingVideo produkcija, Live streaming, Animacije, Multimedia, Post-produkcija
    • Socijalne mreže & MarketingVođenje Social kampanja, Facebook Aplikacije, Twitter, Marketing, Content Strategy
    • Cloud HostingWeb Hosting, Google Apps, Integracija Cloud usluga, LAMP, Windows + IIS, Premium Support
  • Mapa radova
    • Web dizajnDizajniranje webova + User eXperience
    • Mobilne aplikacijeRazvoj / Dizajn mobilnih aplikacija
    • Grafički dizajnPrint, Street, Art, Guerrilla
    • Razvoj i programiranjeWeb / Mobilno / Software / Arhitektura
    • Socijalne mrežeFacebok aplikacije, Sadržaj, Upravljanje
    • Interaktivna multimedijaBanneri, Mikro flash Igre, Online DVD…
    • Live streamingLive prijenosi, MultiCam, Encoding
    • VideografijaVideo, Snimanje, Postprodukcija, Produkcija
    • AnimacijeAnimiranje, postprodukcija, 3D
    • Cloud hostingHosting, Cloud, Google Apps

      • Neke od osvojenih nagrada…
  • Blog
    • Dizajn & ArtDizajn, koncepti, korisnička sučelja :)
    • Programiranje & SoftwareProgramiranje, razvoj, baze podataka, aplikacije
    • Mobilne platforme i aplikacijeMobilni razvoj, dizajn i aplikacije
    • Multimedia + VideoLive streaming, video, animacije, produkcija, post.
    • Socijalne mrežeFacebook, Twitter + ostale socijalne mreže
    • Cloud & HostingGoogle apps, Cloud, CDN, Serveri, Web hosting

        • Neuralab po tiskovinama i visokim TV frekvencijama
          Pogledajte presjek medijskog tjedna iz naše radio...
        • Koncert M83 u zagrebačkoj Tvornici Kulture!
          TTv s ponosom objavljuje kako medijskom dekicom po...

      • tumblr follow button

          - Proskenirajte i naš TUMLBR unofficial blog za all-things-l33t-digital

  • Kontaktirajte nas
    • Kontakti & Socijalne mrežeKarte, Facebook, Twitter, Youtube, Emailovi, Adrese, OIB…
    • Česta Pitanja FAQ – EnglishČesto postavljanja pitanja (Samo na engleskom)
      • Česta pitanja FAQ – Email postavke
      • Česta pitanja FAQ Cloud Hosting – English
      • Česta pitanja FAQ Multimedia Video – English
      • Česta pitanja FAQ Programming MySQL MSSQL

You are here: Neuralab – digitalni dizajn i razvoj za web, mobilne aplikacije, socijalne mreže i cloud / Tag: ASP.NET

Tag Archive for: ASP.NET

Algebra i VIDI.Edu intervjuirali Neuralab [EDUKACIJA]

02 Jan 2012 / 0 Comments / in Coding & Software/by KresimirKoncic

 

Krajem 12. mjeseca smo odradili intervju za novogodišnji VIDI časopis, a teme su bile edukacija u Algebri, slijedni poslovni poduhvati te upotreba klasično stečenog znanja iz Algebra kod razvoja web i mobilnih aplikacija. Kupite svoj VIDI primjerak…još malo pa nestalo ;)

Share/Bookmark

Amazon SES – Simple Email Service – C# code examples [ASP.NET CODES]

25 May 2011 / 0 Comments / in Cloud & Hosting, Coding & Software/by KresimirKoncic
This entry is part 2 of 7 in the series DIY - Tutoriali i riješenja

Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email sending service for businesses and developers. Amazon SES eliminates the complexity and expense of building an in-house email solution or licensing, installing, and operating a third-party email service for this type of email communication. In addition, the service integrates with other AWS services, making it easy to send emails from applications being hosted on AWS. With Amazon SES there is no long-term commitment, minimum spend or negotiation required – businesses can utilize a free usage tier, and beyond that pay only low fees for the number of emails sent plus data transfer fees. You can find out more at official AWS SES page.

 

sesAWSlogo 300x70 Amazon SES   Simple Email Service   C# code examples [ASP.NET CODES]

Here are some of the code snippets in C# (ASP.NET 4.0) but they will also work on earlier .NET versions. Please note that we developed this codes on top of AWS SDK for.NET! This libraries are important for code snippets to work so please implement them in your project before you start to copy & paste :)


First we need to insert AKID and secret key into our Configuration file
 This step is important as it gives you a one point of contact for your access credentials and it is also much safer


List Verified Emails Script (Verified emails are valid addresses from which you can send mass emails)

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Amazon.SimpleEmail;
using Amazon.SimpleEmail.Model;

public partial class ListVerifiedEmails : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//INITIALIZE AWS CLIENT/////////////////////////////////////////////////////////
AmazonSimpleEmailServiceConfig amConfig = new AmazonSimpleEmailServiceConfig();
amConfig.UseSecureStringForAwsSecretKey = false;
AmazonSimpleEmailServiceClient amzClient = new AmazonSimpleEmailServiceClient(ConfigurationManager.AppSettings["AKID"].ToString(), ConfigurationManager.AppSettings["Secret"].ToString(), amConfig);

//LIST VERIFIED EMAILS/////////////////////////////////////////////////////////
ListVerifiedEmailAddressesRequest lveReq = new ListVerifiedEmailAddressesRequest();
ListVerifiedEmailAddressesResponse lveResp = amzClient.ListVerifiedEmailAddresses(lveReq);
ListVerifiedEmailAddressesResult lveResult = lveResp.ListVerifiedEmailAddressesResult;

foreach (Object email in lveResult.VerifiedEmailAddresses)
{
Response.Write(email.ToString()+"
");
}
}
}

Verify email (Verified emails are valid addresses from which you can send mass emails)

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Amazon.SimpleEmail;
using Amazon.SimpleEmail.Model;

public partial class VerifyEmail : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//INITIALIZE AWS CLIENT/////////////////////////////////////////////////////////
AmazonSimpleEmailServiceConfig amConfig = new AmazonSimpleEmailServiceConfig();
amConfig.UseSecureStringForAwsSecretKey = false;
AmazonSimpleEmailServiceClient amzClient = new AmazonSimpleEmailServiceClient(ConfigurationManager.AppSettings["AKID"].ToString(), ConfigurationManager.AppSettings["Secret"].ToString(), amConfig);

//VERIFY EMAIL/////////////////////////////////////////////////////////
VerifyEmailAddressRequest veaRequest = new VerifyEmailAddressRequest();
veaRequest.EmailAddress = "INSERT_EMAIL_TO_VERIFY_HERE";
VerifyEmailAddressResponse veaResponse = amzClient.VerifyEmailAddress(veaRequest);
Response.Write(veaResponse.ResponseMetadata.RequestId);
}
}

Get sending quota limits

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Amazon.SimpleEmail;
using Amazon.SimpleEmail.Model;

public partial class GetQuota : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//INITIALIZE AWS CLIENT/////////////////////////////////////////////////////////
AmazonSimpleEmailServiceConfig amConfig = new AmazonSimpleEmailServiceConfig();
amConfig.UseSecureStringForAwsSecretKey = false;
AmazonSimpleEmailServiceClient amzClient = new AmazonSimpleEmailServiceClient(ConfigurationManager.AppSettings["AKID"].ToString(), ConfigurationManager.AppSettings["Secret"].ToString(), amConfig);

//GET SENDING QUOTA/////////////////////////////////////////////////////////
GetSendQuotaRequest gsqReq = new GetSendQuotaRequest();
GetSendQuotaResponse gsqResp = amzClient.GetSendQuota(gsqReq);
GetSendQuotaResult gsqResult = gsqResp.GetSendQuotaResult;

Response.Write("Max 24 hour send limit: " + gsqResult.Max24HourSend.ToString() + ";
Max send rate: " + gsqResult.MaxSendRate.ToString() + ";
Send last 24 hours: " + gsqResult.SentLast24Hours.ToString());
}
}

quotaSEScurves 300x246 Amazon SES   Simple Email Service   C# code examples [ASP.NET CODES]

Get sending statistics (Bounces, Complaints, Deliveries, Rejects…from last two weeks)

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Amazon.SimpleEmail;
using Amazon.SimpleEmail.Model;

public partial class GetSendStatistics : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//INITIALIZE AWS CLIENT/////////////////////////////////////////////////////////
AmazonSimpleEmailServiceConfig amConfig = new AmazonSimpleEmailServiceConfig();
amConfig.UseSecureStringForAwsSecretKey = false;
AmazonSimpleEmailServiceClient amzClient = new AmazonSimpleEmailServiceClient(ConfigurationManager.AppSettings["AKID"].ToString(), ConfigurationManager.AppSettings["Secret"].ToString(), amConfig);

//GET SEND STATISTICS/////////////////////////////////////////////////////////
GetSendStatisticsRequest gssReq = new GetSendStatisticsRequest();
GetSendStatisticsResponse gssResp = amzClient.GetSendStatistics(gssReq);
GetSendStatisticsResult gssResult = gssResp.GetSendStatisticsResult;

foreach (SendDataPoint sdp in gssResult.SendDataPoints)
{
Response.Write("BOUNCES:" + sdp.Bounces.ToString() + "; COMPLAINTS:" + sdp.Complaints.ToString() + "; DELIVERY ATTEMPTS:" + sdp.DeliveryAttempts.ToString() + "; REJECTS:" + sdp.Rejects.ToString() + "; DateTime:" + sdp.Timestamp.ToLongDateString() + " - " + sdp.Timestamp.ToLongTimeString() + "

");
}
}
}

Send email-to-many (You can only send emails from verified addresses). Please note that your sending quota applies here and that you can send to max. 50 emails in one method call. That means you must divide your email array / que / sendinglist in groups of 50 by 50. PLEASE STUDY QUOTA MANAGEMENT BEFORE SENDING MASS EMAILS

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using Amazon.SimpleEmail;
using Amazon.SimpleEmail.Model;

public partial class EmailTestingSender : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//INITIALIZE AWS CLIENT/////////////////////////////////////////////////////////
AmazonSimpleEmailServiceConfig amConfig = new AmazonSimpleEmailServiceConfig();
amConfig.UseSecureStringForAwsSecretKey = false;
AmazonSimpleEmailServiceClient amzClient = new AmazonSimpleEmailServiceClient(ConfigurationManager.AppSettings["AKID"].ToString(), ConfigurationManager.AppSettings["Secret"].ToString(), amConfig);

ArrayList to = new ArrayList();

//ADD AS TO 50 emails per one sending method//////////////////////
to.Add("INSERT EMAIL 1 HERE");
to.Add("INSERT EMAIL 2 HERE");

//ADD AS TO 50 emails per one sending method/////////////////////
Destination dest = new Destination();
dest.WithBccAddresses((string[])to.ToArray(typeof(string)));
string body = "INSERT HTML BODY HERE";
string subject = "INSERT EMAIL SUBJECT HERE";
Body bdy = new Body();
bdy.Html = new Amazon.SimpleEmail.Model.Content(body);
Amazon.SimpleEmail.Model.Content title = new Amazon.SimpleEmail.Model.Content(subject);
Message message = new Message(title, bdy);
SendEmailRequest ser = new SendEmailRequest("VERIFIED_EMAIL_HERE", dest, message);
SendEmailResponse seResponse = amzClient.SendEmail(ser);
SendEmailResult seResult = seResponse.SendEmailResult;
}
}

What are your send methods and codes? Do you have some advice or experience from SES? Please tell us and share stories in the comments!

Happy coding :)

 

UPDATE: Amazon has extensively updated their Admin panel so you can now perform various checks on bounces, deliveries, complaints and rejects without API coding.  Also, you can setup SMTP access for SES and verify new senders. So head on to the official AWS management console and see all of the cool features for yourself!

Share/Bookmark

Pretražite Neuralab…

Pretplatite se na blog

Blogophske Epizode...

  • DIY – Tutoriali i riješenja (7)
  • Infografike & Chartovi (9)
  • Startuping u Hrvatskoj (7)

socialife sa Neuralabom

Odaberite kategoriju novosti…

  • Cloud & Hosting (29)
  • Coding & Software (23)
  • Design & Art (18)
  • Mobile (14)
  • Multimedia + Video (26)
  • Social media (25)
  • Uncategorized (1)

Arhiva…

  • May 2012 (2)
  • April 2012 (3)
  • March 2012 (6)
  • February 2012 (7)
  • January 2012 (7)
  • October 2011 (2)
  • September 2011 (5)
  • August 2011 (1)
  • July 2011 (5)
  • June 2011 (6)
  • May 2011 (9)
  • April 2011 (8)
  • March 2011 (2)
  • February 2011 (8)
  • January 2011 (2)
  • December 2010 (1)
  • November 2010 (1)
  • October 2010 (4)

Tagovi & Poveznice

amazon apps architecture aws business cloud database design development document DVD event Flash google hosting infografika interview intervju iOs iPad iPhone koncert live management marketing media microsoft mobile mreže seo server service services simple social socijalne spreadsheet storage streaming tablet transmeet tutorial video web zagreb

Kalendar novosti…

May 2012
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  

RSS Cloud hosting status

  • Cloud Sites | SSL Cluster 11| WC1.DFW1 | ONLINE 25/05/2012
    At around 12:30PM CT, our Cloud Sites Engineering team was notified of reports of intermittent latency on one of our SSL cluster in our DFW datacenter. Our engineers are currently actively engaged in troubleshooting the issue. Customers with SSL websites... […]
  • Webmail | Email Services | Online 24/05/2012
    At approximately 5:22 AM CT, the Rackspace Mail team identified an issue that is causing intermittent connectivity for some users who connect via Webmail and through a mail client to our email environment. We are currently investigating the situation and... […]
  • Cloud Sites | Emergency Maintenance | DFW1.WC2 | Wed, May 23, 2012, 12:00AM-01:00AM CT | Complete 23/05/2012
    The Rackspace Cloud system engineers will perform an Emergency Maintenance to our Cloud Sites environment on Wednesday, May 23, 2012 at 12:00am CT. During this maintenance, the following MySQL servers will be placed in read only mode: mysql50-01-master.wc2.dfw1 mysql50-02-master.wc2.dfw1 mysql50-96-master.wc2.dfw1... […]
  • Cloud Sites | SSL WC1.DFW1 | Online 22/05/2012
    At around 6:00PM CST, our Cloud Sites Engineering team was notified of reports of intermittent latency on one of our SSL cluster in our DFW datacenter. Our engineers are currently actively engaged in troubleshooting the issue. Customers with SSL websites... […]
Creative Commons License
This work by Neuralab is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Mi smo [...]

Neuralab [digitalna agencija za web, social, mobile & multimedia dizajn]

Transmeet.Tv [ Internetska televizija fokusirana na urbanu kulturu, muziku i događaje (MusicMap) ]

Neuraplex [ Cloud hosting & infrastrukturne usluge ]

Digitalni oblak d.o.o.
OIB: 63401934653
Tax Num: 02589265

Jurkovićeva 1, 10 000 Zagreb
Tel: +385 98 1717 628
Fax: +385 1 4633 016
Email: info@neuralab.net

Temeljni kapital od 20.000,00 Kn uplaćen u cijelosti pri RBA
Bank acc: 2484008-1105295287
IBAN: HR2624840081105295287

Nabacite lajk Facebook - Neuralab & Facebook - Transmeet.Tv

Iz radionice [...]

  • Live Stream konferencije TEDx SplitMay 12, 2012, 12:52 am

    TEDx Split se pokazao kao ugodan projekt. Sunce i kava uz more, odlična organizacija i zanimljivi predavači opravdali su prijeđenih 800km u 24 sata. Tema konferencije koju smo prenosili uživo bila je edukacija i njeni izazovi. Po TED pravilima svaki predavač imao je na raspolaganju 18 minuta. Štoperica je nemilosrdna. :) TED – ideje koje [...]

  • Altus IT Cloud hosting infografikaApril 28, 2012, 6:49 pm

    Kreirali smo hibrid infografike i brošure za zagrebački Altus IT. Pošto su u procesu razvoja datacentar, kolokacijskog i cloud biznisa, potrebni podaci i istraživanje su bili i više nego komplementarni našem poslovanju :). Infografika je realizirana kroz četiri glavna sadržajna dijela… Ekologija Sigurnost Povezivost i umreženost Vrhunska oprema i podrška Prednja i stražnja strana infografike [...]

spisateljski [...]

  • Neuralab po tiskovinama i visokim TV frekvencijamaMay 23, 2012, 1:29 am
  • Koncert M83 u zagrebačkoj Tvornici Kulture!May 16, 2012, 9:07 pm
  • Objavili smo Terraneo 2011 online.DVD…stay tuned za 2012…April 28, 2012, 4:14 pm
  • Generate Harvest invoice from Google Docs spreadsheet … Cloud styleApril 15, 2012, 8:22 pm
Raznovrsnost / slikovnost / artnost / dizajnost ostavljamo za Tumblr pa nas zapratite tamo :) ...

Follow on Tumblr - Follow neuralab

Tweetup anybody?

  • Očito se u hrvatskoj ne može kupiti #Windows #server 2008 ??? [The-Dropdown-Country-List-issue]
  • Color Harmony: An Animated Explanation of How Color Vision Works circa 1938 | Brain Pickings http://t.co/igDvjSEP
  • Na korak do finala. [Ljubomoran Bilić je već glasao za svog favorita] http://t.co/T2VyjCOu
  • Sve što trebate znati o Live streamingu http://t.co/EIIn5Xkn via @zimoonline #LiveStreaming #Adobe #Wowza #Live #Streaming
Pratite nas na zajedničkom Transmeet.Tv / Neuralab twitter profilu ... all things dizajn / art / programiranje / muzika / kultura / chit-chat
Follow @transmeettv
© Copyright - Neuralab - digitalni dizajn i razvoj za web, mobilne aplikacije, socijalne mreže i cloud - Powered by Neuraplex Cloud hosting - a.neuralab.site
  • scroll to top
  • Send us Mail
  • Follow us on Twitter
  • Join our Facebook Group
  • Subscribe to our RSS Feed