Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Send-GmailMessage is fitting message body to a set width #76

Closed
jtwaddle opened this issue Jul 16, 2018 · 4 comments
Closed

[Issue] Send-GmailMessage is fitting message body to a set width #76

jtwaddle opened this issue Jul 16, 2018 · 4 comments
Assignees
Labels

Comments

@jtwaddle
Copy link

Describe the bug
Send-GmailMessage is fitting the body of the message to a specific width instead of sending the text the way it was passed into the function.

To Reproduce
Steps to reproduce the behavior:

  1. Use Send-GmailMessage and make sure to have enough text in a line to go beyond the set width.

Expected behavior
I would expect the Send-GmailMessage to send the message body as I pass it. It appears to be setting the message to a specific width. Here are two screenshots. One showing the message with the full width in GMail and the other showing it shrunk when sending it using Send-GMailMessage.

fullmessage
shrunkmessage

@scrthq scrthq self-assigned this Jul 16, 2018
@scrthq scrthq added the bug label Jul 16, 2018
@scrthq
Copy link
Member

scrthq commented Jul 16, 2018

thanks, @jtwaddle ! PSGSuite uses MimeKit underneath to build the raw Mime message... I'll check it out and see if any tweaking can be done to get it to match what's expected!

@scrthq
Copy link
Member

scrthq commented Jul 21, 2018

@jtwaddle - So, I'm trying to replicate this on my end, but all attempts are showing it formatted correctly for me:

image

Here's my code I'm using; can you post yours in case it's any different?

$body = @'
The United States Declaration of Independence is the statement adopted by the Second Continental Congress meeting at the Pennsylvania State House (now known as Independence Hall) in Philadelphia, Pennsylvania on July 4, 1776. The Declaration announced that the Thirteen Colonies then at war with the Kingdom of Great Britain would regard themselves as thirteen independent sovereign states no longer under British rule. With the Declaration, these new states took a collective first step toward forming the United States of America. The declaration was signed by representatives from New Hampshire, Massachusetts Bay, Rhode Island, Connecticut, New York, New Jersey, Pennsylvania, Maryland, Delaware, Virginia, North Carolina, South Carolina, and Georgia. The Lee Resolution for independence was passed on July 2 with no opposing votes. The Committee of Five had drafted the Declaration to be ready when Congress voted on independence. John Adams, a leader in pushing for independence, had persuaded the committee to select Thomas Jefferson to compose the original draft of the document,[2] which Congress edited to produce the final version. The Declaration was a formal explanation of why Congress had voted to declare independence from Great Britain, more than a year after the outbreak of the American Revolutionary War. Adams wrote to his wife Abigail, "The Second Day of July 1776, will be the most memorable Epocha, in the History of America"[3] – although Independence Day is actually celebrated on July 4, the date that the wording of the Declaration of Independence was approved. After ratifying the text on July 4, Congress issued the Declaration of Independence in several forms. It was initially published as the printed Dunlap broadside that was widely distributed and read to the public. The source copy used for this printing has been lost and may have been a copy in Thomas Jefferson's hand.[4] Jefferson's original draft is preserved at the Library of Congress, complete with changes made by John Adams and Benjamin Franklin, as well as Jefferson's notes of changes made by Congress. The best-known version of the Declaration is a signed copy that is displayed at the National Archives in Washington, D.C., and which is popularly regarded as the official document. This engrossed copy was ordered by Congress on July 19 and signed primarily on August 2.[5][6] The sources and interpretation of the Declaration have been the subject of much scholarly inquiry. The Declaration justified the independence of the United States by listing colonial grievances against King George III and by asserting certain natural and legal rights, including a right of revolution. Having served its original purpose in announcing independence, references to the text of the Declaration were few in the following years. Abraham Lincoln made it the centerpiece of his policies and his rhetoric, as in the Gettysburg Address of 1863. Since then, it has become a well-known statement on human rights, particularly its second sentence: We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. This has been called "one of the best-known sentences in the English language",[7] containing "the most potent and consequential words in American history".[8] The passage came to represent a moral standard to which the United States should strive. This view was notably promoted by Lincoln, who considered the Declaration to be the foundation of his political philosophy and argued that it is a statement of principles through which the United States Constitution should be interpreted.[9] The Declaration of Independence inspired many similar documents in other countries, the first being the 1789 Declaration of Flanders issued during the Brabant Revolution in the Austrian Netherlands. It also served as the primary model for numerous declarations of independence in Europe and Latin America, as well as Africa (Liberia) and Oceania (New Zealand) during the first half of the 19th century.[10]
'@

Send-GmailMessage -Subject "test long body" -To (Show-PSGSuiteConfig).AdminEmail -Body $body -Verbose

@scrthq
Copy link
Member

scrthq commented Jul 21, 2018

Also - worth noting that I'm using PSGSuite 2.12.0 here, which included updates to the Google .NET SDK's inside.

The issue you're describing seems to be real, as I've found another report of someone using the same setup (MimeKit + Gmail .NET SDK) to send messages and the text was being wrapped: https://stackoverflow.com/questions/47425399/send-message-via-gmailservice-api-auto-wraps-lines

@scrthq
Copy link
Member

scrthq commented Aug 31, 2018

hey @jtwaddle - closing this out since everything is working fine for me since testing. If you haven't updated to the latest version of PSGSuite, I invite you to do so and try this out!

@scrthq scrthq closed this as completed Aug 31, 2018
@ghost ghost removed the work in progress label Aug 31, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants