Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

No pop-up to send mail.
Started by ads_96 Mar 21 2019 09:30 AM

5 replies to this topic

Best Answer nick_sherman , 22 March 2019 - 05:34 AM

I believe so, these are native mobile APIs being called so the simulator has nothing to call on Windows/Mac.

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ads_96

[GLOBAL: userInfoPane.html]
ads_96
  • Observer

  • 8 posts
  • Corona SDK

No pop-ups appeared when I ran this method. 

local function sendEmails()
	local numberOfMembers = table.getn(requestedMembers)
	if numberOfMembers > 0 then
		for i = 1, numberOfMembers, 1 do
			for row in db:rows( [[SELECT first_name, email FROM members WHERE id = ]] .. requestedMembers[i]) do 
				local options =
				{
					to = row.email,
					cc = "15148947@studentmail.ul.ie",
					subject = "Requested book available",
					isBodyHtml = true,
					body = "<html><body>Your requested book is now available.</body></html>",
				}
				native.showPopup("mail", options)
			end
		end
	end
end		

How do I send mail?



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,726 posts
  • Corona SDK

Are you certain numberOfMembers is > 0?

[TOPIC: post.html]
#3

ads_96

[GLOBAL: userInfoPane.html]
ads_96
  • Observer

  • 8 posts
  • Corona SDK

Are you certain numberOfMembers is > 0?

 

Yep, I'm sure.



[TOPIC: post.html]
#4

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,726 posts
  • Corona SDK

Is this code running on device or Corona simulator?

[TOPIC: post.html]
#5

ads_96

[GLOBAL: userInfoPane.html]
ads_96
  • Observer

  • 8 posts
  • Corona SDK

Is this code running on device or Corona simulator?

 

The simulator. Does it need to be the device? Is there no way of making it work on the simulator?



[TOPIC: post.html]
#6

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,726 posts
  • Corona SDK

  Best Answer

I believe so, these are native mobile APIs being called so the simulator has nothing to call on Windows/Mac.
  • ads_96 likes this


[topic_controls]
[/topic_controls]