GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/compute/mailjet at main · fredatgithub/java-docs-samples

Expand file tree

/

mailjet

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

mailjet

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Java Mailjet Email Sample for Google Compute Engine

Open in Cloud Shell

This sample demonstrates how to use Mailjet on Google Compute Engine

See the sample application documentaion for more detailed instructions.

For more information about Mailjet, see their documentation.

Running on Compute Engine

To run the sample, you will need to do the following:

  1. Create a Mailjet Account.

  2. Create a compute instance on the Google Cloud Platform Developer's Console

  3. SSH into the instance you created

  4. Update packages and install required packages

    sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven

  5. Clone the repo

    git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git

  6. Configure your Mailjet settings in the java class (MAILJET_API_KEY, SENDGRID_SENDER)

    java-docs-samples/compute/mailjet/src/main/java/com/example/compute/mailjet/MailjetSender.java

  7. Navigate back to ./Mailjet and use maven to package the class as a jar

    mvn clean package

  8. Make sure that openjdk 8 is the selected java version

    sudo update-alternatives --config java

  9. Execute the jar file with your intended recipient and sender emails as arguments and send an email (make sure you are in the target folder)

    java -jar compute-mailjet-1.0-SNAPSHOT-jar-with-dependencies.jar [RECIPIENT EMAIL] [SENDER EMAIL]

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.